Data Structures & Algorithms
Language-agnostic algorithmic foundations with Java examples and Java Collections mapping. Big-O, classic data structures, algorithm paradigms, and interview pattern recognition.
01Big-O, Big-Theta, Big-Omega, Amortized Analysis
JuniorNot started
Big-O, Big-Theta, Big-Omega, Amortized Analysis
Asymptotic notation, amortized analysis, best/avg/worst case, the master theorem, and why constants still matter at small n.
01Define Big-O, Big-Omega, and Big-Theta. How do they differ?Junior02What does "amortized O(1)" mean? Use ArrayList.add() as the example.Mid03Best vs average vs worst case — give an example where they differ (QuickSort).Mid02Arrays & Strings
JuniorNot started
Arrays & Strings
Dynamic-array amortization, the two-pointer and sliding-window patterns, prefix sums, and in-place array tricks.
01Why is ArrayList.add() amortized O(1)? Walk through the doubling.Mid02The two-pointer pattern — when does it apply?Mid03Sliding window — fixed vs variable size. When do you reach for it?Mid03Linked Lists
MidNot started
Linked Lists
Singly/doubly/circular lists, Floyd's cycle detection, the dummy-head pattern, and in-place reversal.
01Singly vs doubly linked list — trade-offs.Mid02Why is Java's LinkedList almost always the wrong choice despite the name?Mid03Floyd's tortoise-and-hare — explain cycle detection and finding the cycle start.Mid04Stacks & Queues
MidNot started
Stacks & Queues
LIFO/FIFO semantics, monotonic stacks, deques, and why ArrayDeque is the modern default for both.
01Why is Stack (extends Vector) considered legacy? What replaces it?Mid02Why is ArrayDeque the modern default for both stack and queue?Mid03Monotonic stack — what is it, and when do you use it?Senior05Hash Tables
MidNot started
Hash Tables
Hashing, collision resolution, load factor and rehashing, hash functions, and the HashMap/HashSet/LinkedHashMap mapping. The single highest-leverage interview topic.
01Walk through HashMap.put step by step.Mid02Worst-case complexity of HashMap.get in modern Java?Mid03Open addressing vs chaining — trade-offs.Senior06Binary Trees & Binary Search Trees
MidNot started
Binary Trees & Binary Search Trees
Tree terminology, the four traversals, BST invariants and operations, and why unbalanced BSTs degrade to O(n).
01DFS traversals (preorder/inorder/postorder) — recursive and iterative.Mid02Level-order (BFS) traversal using a queue.Mid03Why does an unbalanced BST degrade? When does this happen in practice?Mid07Balanced Trees — AVL, Red-Black, B-trees
SeniorNot started
Balanced Trees — AVL, Red-Black, B-trees
Why balancing matters, AVL rotations, the five red-black invariants, and why databases use B-trees. Maps to TreeMap/TreeSet and HashMap treeification.
01Why do we need balanced trees? (The worst-case bound.)Senior02AVL invariant — what does it guarantee? Insertion/deletion rotation rules.Senior03Red-black tree properties (the five invariants).Senior08Heaps & Priority Queues
MidNot started
Heaps & Priority Queues
Binary-heap invariant and array representation, O(n) build-heap, heap sort, top-K, and the two-heap streaming-median technique.
01Binary heap — the array index math for parent and children.Mid02Why is build-heap O(n) and not O(n log n)?Senior03PriorityQueue.iterator() — what order does it give you?Mid09Tries (Prefix Trees)
SeniorNot started
Tries (Prefix Trees)
Trie node structure, insert/search/prefix operations, space/time trade-offs, and applications like autocomplete and word search.
01When is a trie better than a hash set?Mid02Space cost of a trie — when does it become prohibitive?Senior03Implement a Trie (insert, search, startsWith).Mid10Graphs — Representation, BFS, DFS
SeniorNot started
Graphs — Representation, BFS, DFS
Adjacency list vs matrix, BFS for unweighted shortest path, DFS for connectivity/cycles, topological sort, and connected components.
01Adjacency list vs matrix — space and time trade-offs.Mid02When does BFS find the shortest path?Mid03DFS — recursive vs iterative (with explicit stack).Mid11Shortest Path & Minimum Spanning Tree
SeniorNot started
Shortest Path & Minimum Spanning Tree
Dijkstra, Bellman-Ford, Floyd-Warshall, A*, and the two MST algorithms (Kruskal and Prim).
01Why does Dijkstra fail with negative edges? How does Bellman-Ford handle it?Senior02Time complexity of Dijkstra with a binary heap vs a Fibonacci heap.Senior03When does Floyd-Warshall make sense?Senior12Union-Find (Disjoint Set Union)
SeniorNot started
Union-Find (Disjoint Set Union)
Path compression, union by rank/size, near-constant amortized time (inverse Ackermann), and the classic applications.
01Path compression — what does it do and why?Senior02Union by rank vs union by size.Senior03Why is the amortized cost effectively O(1)?Senior13Sorting Algorithms
MidNot started
Sorting Algorithms
Comparison and non-comparison sorts, stability and in-place properties, the Ω(n log n) lower bound, and what Arrays.sort/Collections.sort actually use.
01Compare QuickSort, MergeSort, HeapSort: time, space, stability.Mid02Why does Arrays.sort use Quicksort for primitives but Timsort for objects?Senior03What is Timsort? Why is it real-world-fast?Senior14Searching & Binary Search
MidNot started
Searching & Binary Search
Binary search and its four classic bugs, the overflow-safe midpoint, binary search on the answer, and boundary-finding variants.
01Classic binary search — the four common bugs.Mid02lo + (hi - lo) / 2 vs (lo + hi) / 2 — why the difference matters.Mid03Binary search on the answer — what does it mean? When does it apply?Senior15Recursion & Backtracking
SeniorNot started
Recursion & Backtracking
Base/recursive cases, the call stack, why Java does not optimize tail recursion, and the backtracking template with pruning.
01How do you reason about recursive complexity?Senior02The backtracking template — what are the common building blocks?Mid03When is recursion clearer than iteration? When is it worse?Mid16Dynamic Programming
SeniorNot started
Dynamic Programming
Overlapping subproblems and optimal substructure, memoization vs tabulation, finding the state, space optimization, and the knapsack family. The highest-leverage senior topic.
01The two properties a problem needs for DP to apply.Senior02Memoization vs tabulation — when to use each?Mid03How do you "find the state" of a DP problem?Senior17Greedy Algorithms
SeniorNot started
Greedy Algorithms
The greedy-choice property, when greedy works vs when it fails, the exchange argument, and how to decide greedy vs DP.
01When does greedy work? When does it fail?Senior02The exchange argument — what is it?Senior03Greedy vs DP — how to decide which to use.Senior18Bit Manipulation
SeniorNot started
Bit Manipulation
Java's bitwise operators (including >>>), the common bit tricks, XOR properties, and bitmask enumeration/DP.
01Difference between >> and >>> in Java.Mid02n & (n-1) — what does it do and why is it useful?Mid03XOR properties: a ^ a = 0, a ^ 0 = a, commutative, associative.Mid19Math & Number Theory
SeniorNot started
Math & Number Theory
GCD/LCM, modular arithmetic, prime testing, the Sieve of Eratosthenes, fast exponentiation, and combinatorics basics.
01Euclidean algorithm for GCD — why does it work?Mid02Fast modular exponentiation — O(log n) vs naive O(n).Senior03Sieve of Eratosthenes — time complexity.Mid20Pattern Recognition for Interview Problems
SeniorNot started
Pattern Recognition for Interview Problems
The meta-skill that separates senior from middle candidates: mapping a problem statement to the right algorithmic pattern.
01Shortest-path cues → BFS / Dijkstra / Bellman-Ford. How do you choose?Senior02Kth largest, running median, find-the-cycle — which structure each implies.Senior03Subarray sum / longest substring with property P → prefix sum or sliding window.Senior