Learning Topics

Choose Topics Accordingly

Stack in C++

  1. Stacks are a type of container adaptor, specifically designed to operate in a LIFO context (last-in first-out). New element is added at one end (top) and an element is removed from that end only.
stack<int>v; v.top():10
10
v.size(): 1

Code

  1. Simple Push and Pop in Stack
    CPP
  2. Empty and Size in Stack
    CPP

Solve Questions