Data Structures & Algorithms Interview Questions & Answers — Cracked Java
// Module · 20 topics · 219 questions

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.

0%
Reviewed
0 / 219
Topics done
0 / 20
Est. time left
~80h
Next up
Big-O, Big-Theta, Big-Omega, Amortized Analysis
20 topics
01Junior8 Q0

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.

Not startedStart →
02Junior10 Q0

Arrays & Strings

Dynamic-array amortization, the two-pointer and sliding-window patterns, prefix sums, and in-place array tricks.

Not startedStart →
03Mid12 Q0

Linked Lists

Singly/doubly/circular lists, Floyd's cycle detection, the dummy-head pattern, and in-place reversal.

Not startedStart →
04Mid11 Q0

Stacks & Queues

LIFO/FIFO semantics, monotonic stacks, deques, and why ArrayDeque is the modern default for both.

Not startedStart →
05Mid12 Q0

Hash Tables

Hashing, collision resolution, load factor and rehashing, hash functions, and the HashMap/HashSet/LinkedHashMap mapping. The single highest-leverage interview topic.

Not startedStart →
06Mid14 Q0

Binary Trees & Binary Search Trees

Tree terminology, the four traversals, BST invariants and operations, and why unbalanced BSTs degrade to O(n).

Not startedStart →
07Senior10 Q0

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.

Not startedStart →
08Mid12 Q0

Heaps & Priority Queues

Binary-heap invariant and array representation, O(n) build-heap, heap sort, top-K, and the two-heap streaming-median technique.

Not startedStart →
09Senior7 Q0

Tries (Prefix Trees)

Trie node structure, insert/search/prefix operations, space/time trade-offs, and applications like autocomplete and word search.

Not startedStart →
10Senior13 Q0

Graphs — Representation, BFS, DFS

Adjacency list vs matrix, BFS for unweighted shortest path, DFS for connectivity/cycles, topological sort, and connected components.

Not startedStart →
11Senior9 Q0

Shortest Path & Minimum Spanning Tree

Dijkstra, Bellman-Ford, Floyd-Warshall, A*, and the two MST algorithms (Kruskal and Prim).

Not startedStart →
12Senior9 Q0

Union-Find (Disjoint Set Union)

Path compression, union by rank/size, near-constant amortized time (inverse Ackermann), and the classic applications.

Not startedStart →
13Mid10 Q0

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.

Not startedStart →
14Mid11 Q0

Searching & Binary Search

Binary search and its four classic bugs, the overflow-safe midpoint, binary search on the answer, and boundary-finding variants.

Not startedStart →
15Senior14 Q0

Recursion & Backtracking

Base/recursive cases, the call stack, why Java does not optimize tail recursion, and the backtracking template with pruning.

Not startedStart →
16Senior19 Q0

Dynamic Programming

Overlapping subproblems and optimal substructure, memoization vs tabulation, finding the state, space optimization, and the knapsack family. The highest-leverage senior topic.

Not startedStart →
17Senior10 Q0

Greedy Algorithms

The greedy-choice property, when greedy works vs when it fails, the exchange argument, and how to decide greedy vs DP.

Not startedStart →
18Senior13 Q0

Bit Manipulation

Java's bitwise operators (including >>>), the common bit tricks, XOR properties, and bitmask enumeration/DP.

Not startedStart →
19Senior10 Q0

Math & Number Theory

GCD/LCM, modular arithmetic, prime testing, the Sieve of Eratosthenes, fast exponentiation, and combinatorics basics.

Not startedStart →
20Senior5 Q0

Pattern Recognition for Interview Problems

The meta-skill that separates senior from middle candidates: mapping a problem statement to the right algorithmic pattern.

Not startedStart →