(!
main_q.empty()) {
89assert(s.
size() == 3);
91assert(s.
top() == 3);
94assert(s.
top() == 2);
97assert(s.
top() == 1);
100assert(s.
top() == 5);
103assert(s.
top() == 1);
105assert(s.
size() == 1);
static void test()
Self-test implementations.
int main()
Main function.
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
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4