Datastructures

Stacks

  1. Stacks - aLIFO/FILO Principle. Functions of
    1. push()
    2. pop()
    3. peek()
    4. isEmpty()
    5. capacity
    6. top - A stack is either empty or it consists of a top
  2. Examples - stack of plates, undo mechanism - changes save in stack

Queue

  1. Queues - FIFO/LILO Principle. Functions of queue are
    1. enqueue()
    2. dequeue()
    3. isEmpty()
    4. isFront()
    5. isBack()
    6. clear()
  2. Circular Queue

  3. Depth-First Search with a Stack
  4. Breadth-First Search with a Queue

References

  1. [andrew.cmu.edu])(https://www.andrew.cmu.edu/course/15-121/lectures/Stacks%20and%20Queues/Stacks%20and%20Queues.html)