Skip to content

Latest commit

 

History

History
16 lines (12 loc) · 551 Bytes

README.md

File metadata and controls

16 lines (12 loc) · 551 Bytes

stack-queue-data-structure

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

  1. void push(T data) # push a node into the stack/queue
  2. T pop() # remove a node from the stack/queue and return its data
  3. T top() # return the data of the node at the top of the stack/queue
  4. bool empty() # check whether the stack/queue is empty
  5. int size() # return the size of the stack/queue
  6. void clear() # clear the stack/queue