Stack and Queue Data Structures
Stack and Queue implementation using singly linked list interface.
The following functions are available:
template "class T"
class Stack/Queue
- void push(T data) # push a node into the stack/queue
- T pop() # remove a node from the stack/queue and return its data
- T top() # return the data of the node at the top of the stack/queue
- bool empty() # check whether the stack/queue is empty
- int size() # return the size of the stack/queue
- void clear() # clear the stack/queue