two-pointer-sorted-array-pattern

Status: IN

Solutions pairing min/max elements (e.g., distinct averages) sort once then walk inward with left/right pointers rather than simulating repeated removal, achieving O(n log n) overall.

Source: entries/2026/06/06/number-of-distinct-averages-solution.md

Depended on by

JSON