Stack: Elements can be inserted and deleted only from one side of the list, called the top. The insertion of an element is called push operation and the deletion of an element is called pop operation.
Queue: Elements can be inserted only from one side of the list called Rear, and the elements can be deleted only from the other side called the Front. It’s the insertion of an element in a queue is called an Enqueue operation and the deletion of an element is called a Dequeue operation.
| # | Title | Solution | Difficulty | Companies |
|---|---|---|---|---|
1. | Stack and its basic operations | |||
2. | Array and Linked List Implementation of Stack | |||
3. | Example 1 : Validate Stack Sequences | MEDIUM | ||
4. | Example 2 : Reverse a stack using recursion | EASY | Yahoo Amazon Adobe | |
5. | Queue and its basic operations | |||
6. | Array and Linked List Implementation of Queue | |||
7. | Example 1 : Implement Queue using stacks | EASY | Facebook Amazon Microsoft | |
8. | Example 2 : Reverse first k elements of a queue | MEDIUM | ||
9. | Applications of Stack and Queue |