Array

Arrays are the foundation of many algorithm problems. Learn techniques for searching, sorting, manipulation, and optimization of array-based problems that appear in almost every technical interview.

Key Techniques:

Two pointers: Pair finding, partitioning, removing duplicates
Sliding window: Subarrays with constraints
Binary search: Finding elements in sorted arrays
Kadane’s algorithm: Maximum subarray sum
Dutch National Flag: Three-way partitioning

Common Problems:

Two Sum, Three Sum variations
Maximum subarray (Kadane’s)
Merge intervals
Rotate array
Missing number, duplicate detection

Complexity Goals:

Aim for O(n) or O(n log n) time complexity
Minimize space usage (often O(1) is possible)
Avoid nested loops when possible

Scroll to Top