[]Topic

Arrays & Hashing Problems

Array and hashing problems — the bedrock of coding interviews. Master indexing, prefix sums, and hash-map tricks.

Easy · 3

Medium · 8

Array problems are the entry point to algorithmic interviews and the most common pattern across every coding ladder. Almost every harder pattern — sliding window, two pointers, dynamic programming — is built on a foundation of array manipulation. Strong array fluency means you can iterate, index, and transform a sequence without thinking, freeing your mind for the harder reasoning the interviewer actually cares about.

Hashing extends this foundation. A hash map turns expensive O(n) lookups into O(1), and an entire class of "find the duplicate / find the pair / find the missing" problems collapses to a single pass with a map or set. Pair hashing with prefix sums and you can solve subarray-sum and partition problems in linear time. Pair it with sliding windows and you get the canonical "longest substring" pattern.

The Ratta arrays-and-hashing track covers Two Sum, Group Anagrams, Top K Frequent Elements, Product of Array Except Self, Encode and Decode Strings, and Longest Consecutive Sequence — the exact set asked at every FAANG-tier interview. Every problem ships with intuition, step-by-step approach, time/space analysis, and verified solutions in C++, Java, Python, and Go so you can practice in your interview language.

Browse other topics