Several powerful techniques transform seemingly complex array problems into elegant linear-time solutions. The Two Pointers technique uses two indices moving toward each other or in the same direction, achieving O(n) time on sorted arrays. Classic applications include finding pairs summing to a target (two_sum_sorted), solving the 3Sum problem, and computing container areas with most water by moving the shorter pointer inward.
The Sliding Window technique maintains a contiguous subarray and slides it across the input, adding elements on one end while removing from the other. Fixed-size windows efficiently compute maximum sums of subarrays, while variable-size windows solve problems like minimum window substring and longest substring without repeating characters. The combination of sliding windows with monotonic queues enables solving sliding window maximum in O(n) amortized time.
Prefix Sum arrays enable O(1) range sum queries after O(n) preprocessing, with the technique extending naturally to 2D for sub-rectangle queries. Other specialized array techniques include Kadane's algorithm for maximum subarray sum in O(n), the Dutch National Flag algorithm for three-way partitioning in a single pass, and the Difference Array for efficient range updates. The trap rain water problem and product of array except self problem showcase how two-pointer techniques can replace extra space with elegant pointer manipulation.