Arrays Learning Path
Learn array traversal, two pointers, in place updates, hashing, and prefix techniques through Java examples.
Read article →Build the mental model and learn the reusable implementation pattern.
Learn array traversal, two pointers, in place updates, hashing, and prefix techniques through Java examples.
Read article →Build a clear mental model for array indexing, traversal, updates, and common problem solving patterns.
Read article →Learn two pointers through palindrome checks, sorted pair sums, duplicate removal, merging, and fast/slow linked-list examples, with diagrams and explained Java code.
Read article →Learn prefix sums from scratch with visual examples, Java code, recognition clues, common subarray patterns, and mistakes to avoid.
Read article →Use the core idea in a direct problem with one main decision.
Learn to keep a running maximum, reason about each comparison, and trace a one-pass Java solution.
Read article →Track the two largest distinct values in one pass without sorting the array.
Read article →Verify nondecreasing order by checking each adjacent pair once.
Read article →Use read and write pointers to keep one copy of each value in place.
Read article →Move every zero to the end while preserving the order of nonzero values.
Read article →Find the missing value from 1 through n using XOR without overflow.
Read article →Combine the pattern with boundaries, state, or another technique.
Rotate an array by k positions in place with the reversal technique.
Read article →Count subarrays with sum K using a prefix sum and frequency map, with beginner-friendly diagrams, a dry run, Java solutions, and common mistakes.
Read article →Merge two sorted arrays into a sorted list of distinct values with two pointers.
Read article →Use prefix sums and earliest indexes to handle positive and negative values in linear time.
Read article →Work through problems with less obvious invariants and tighter constraints.