Start Learning
Javaneer
Back to roadmap
🎯
Stage 0

Complexity & Problem-Solving

Think in trade-offs before you write a line.

The foundation every algorithm interview rests on: how to break a problem down, reason about time and space complexity, understand amortized cost, and pick the right data structure - plus the catalog of patterns the rest of the path drills.

6 Lessons in this stage1 h 21 min
Start the first lesson

Lessons in this stage

  1. 01

    How to Solve It

    Intermediate

    A repeatable method for attacking any interview problem - clarify, examples, brute force, optimize, code, test - and how to think out loud while you do it.

    14 min
  2. 02

    Big-O in Practice

    Intermediate

    Reading the time complexity of real code: loops, nested loops, halving, and the common complexity classes from O(1) to O(2^n).

    16 min
  3. 03

    Space Complexity

    Intermediate

    The other axis interviewers probe: auxiliary space, the hidden cost of the recursion call stack, and the classic time-vs-space trade-off.

    12 min
  4. 04

    Amortized Analysis

    Advanced

    Why ArrayList.add is O(1) 'on average' even though it sometimes copies everything: amortized cost and the doubling trick.

    12 min
  5. 05

    Choosing a Data Structure

    Intermediate

    A decision guide from the operations a problem needs (lookup, order, dedupe, range, priority) to the Java structure that delivers them.

    14 min
  6. 06

    The Pattern Catalog

    Intermediate

    A map of the recurring patterns - two pointers, sliding window, BFS/DFS, binary search, dynamic programming - and how to recognize which a problem wants.

    13 min