Start Learning
Javaneer
Back to roadmap
🔢
Stage 1

Arrays & Strings

The patterns behind half of all interview questions.

Arrays and strings are where most interviews start. Master the workhorse patterns - two pointers, sliding window, prefix sums, and in-place manipulation - that turn brute-force O(n^2) solutions into clean O(n) ones.

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

Lessons in this stage

  1. 01

    The Two-Pointer Pattern

    Intermediate

    Walk a sorted array from both ends (or at two speeds) to solve pair-sum, dedupe, and reversal problems in one pass and O(1) space.

    15 min
  2. 02

    The Sliding Window

    Advanced

    Grow and shrink a window over a sequence to answer 'best/longest/shortest subarray' questions in a single pass instead of re-scanning.

    16 min
  3. 03

    Prefix Sums

    Intermediate

    Precompute running totals so any range-sum query becomes O(1) - the trick behind subarray-sum and equilibrium problems.

    13 min
  4. 04

    In-Place Manipulation

    Intermediate

    Reverse, rotate, and rearrange arrays using O(1) extra space, and why interviewers love the constraint.

    13 min
  5. 05

    String Essentials

    Intermediate

    Anagrams, palindromes, and frequency counting - the string toolkit, plus why immutability makes StringBuilder your friend in a hot loop.

    14 min