Start Learning
Javaneer
Back to roadmap
🔗
Stage 2

Linked Lists, Stacks & Queues

Pointer surgery and the structures built on it.

Linked lists teach the pointer manipulation interviewers love to test, and they're the backbone of stacks and queues. Master traversal and reversal, the fast/slow-pointer trick, and when to reach for a stack (LIFO) or a queue/deque (FIFO).

5 Lessons in this stage1 h 13 min
Start the first lesson

Lessons in this stage

  1. 01

    Linked List Fundamentals

    Intermediate

    Nodes and references, why insertion is O(1) but access is O(n), and the dummy-head trick that removes edge cases.

    14 min
  2. 02

    Reversing a Linked List

    Advanced

    The canonical pointer-surgery problem: re-thread a list in place with three pointers, iteratively and recursively.

    15 min
  3. 03

    Fast & Slow Pointers

    Advanced

    One pointer moving twice as fast as another detects cycles, finds the middle, and locates the nth-from-end in one pass.

    15 min
  4. 04

    Stacks in Practice

    Intermediate

    LIFO in action: matching brackets, evaluating expressions, and the monotonic stack for next-greater-element problems.

    15 min
  5. 05

    Queues & Deques

    Intermediate

    FIFO for BFS and scheduling, and the double-ended queue that powers sliding-window-maximum in O(n).

    14 min