Stack :
- In the Stack Data structure we follow the LIFO Principle.
- ( Last In Fisrt Out )
- In stack we have TOP Pointer.
- If Stack is empty then the TOP points to -1.
- Operations on the Stack: a. Push(parameter) b. Pop c. Peek d. isFull() e. isEmpty()
Queue:
- In the Queue Data structure we follow the FIFO Principle.
- ( First In Fisrt Out )
- In Queue we have FRONT, REAR Pointer.
- If Queue is empty then the TOP points to -1.
- Here, we delete the element from the FRONT And Inserting of an Element from REAR end.
- Operations on the Queue: a. Enqueue(parameter) b. Dequeue() c. Peek() d. isFull() e. isEmpty()