| Stacks are based on the LIFO principle, |
Queues are based on the FIFO principle |
| Insertion and deletion in stacks takes place only from one end of the list called the top. |
Insertion and deletion in queues takes place from the opposite ends of the list. The insertion takes place at the rear of the list and the deletion takes place from the front of the list. |
| Insert operation is called push operation. |
Insert operation is called enqueue operation |
| Delete operation is called pop operation. |
Delete operation is called dequeue operation. |
| one pointer to access the list, called the top, which always points to the last element present in the list. |
In queues we maintain two pointers to access the list.frontand rear |
| Stack is used in solving problems works on recursion. |
Queue is used in solving problems having sequential processing. |