Algorithmic foundations for interviews and real-world performance.
The fundamental building blocks of DSA.
Master arrays first: unlock O(1) indexing, amortized appends, and the problem-solving backbone of interviews.
Push, pop, peek — all O(1). Stacks enforce LIFO order and unlock matching, DFS, undo, and reverse-order interview patterns.
First in, first out — all O(1) with the right implementation. Queues power BFS, level-order traversal, and any problem with FIFO processing.
Unlock O(1) lookups, inserts, and deletes — hash maps and sets are the interview workhorse for counting, deduplication, and fast membership testing.
No contiguous memory, no indexing — linked lists trade random access for O(1) pointer manipulation at known locations.
Hierarchical structure, DFS and BFS traversals, balanced vs unbalanced — trees are the foundation of recursive problem solving.
Vertices, edges, and traversal — graphs model relationships and unlock BFS, DFS, and shortest-path algorithms.
Specialized data structures that go beyond the basics — tries, heaps, and trees designed for specific query patterns.
The base patterns you reuse everywhere.
Algorithmic patterns that build on the fundamentals — advanced techniques for harder problems.