Back to Data Structures & Algorithms

Stack & Queue

Exploring stacks, queues, and their variations like deques, priority queues, and applications like the LRU Cache.

1 week

Topics in this Chapter

1

Stack Operations

Implementing stacks and understanding their LIFO (Last-In, First-Out) behavior.

2

Infix-Prefix-Postfix

Using stacks to convert expressions between infix, prefix, and postfix notations.

3

Monotonic Stack

Applying the monotonic stack pattern to problems like 'Next Greater Element'.

4

Queue & Deque

Understanding FIFO queues and double-ended queues (Deques).

5

Priority Queue

Implementing and using priority queues, often with a heap.

6

LRU Cache

Designing and implementing a Least Recently Used (LRU) Cache.

GeekDost - Roadmaps & Snippets for Developers