89 assert(s.
size() == 3);
100 assert(s.
top() == 5);
103 assert(s.
top() == 1);
105 assert(s.
size() == 1);
Functions for the Stack Using Queue implementation.
Stack Class implementation for basic methods of Stack Data Structure.
std::queue< int64_t > auxiliary_q
void pop()
Removes the topmost element from the stack.
int size()
Utility function to return the current size of the stack.
std::queue< int64_t > main_q
stores the current state of the stack
void push(int val)
Inserts an element to the top of the stack.
uint32_t current_size
stores the current size of the stack