Mental Model
Use two pointers to overwrite duplicates in a sorted array, keeping only unique elements at the front.
Analogy: Imagine sorting your books on a shelf and removing extra copies by sliding unique books forward, ignoring repeats behind.
Array: [1, 1, 2, 2, 3, 4, 4] Pointers: i ↑ j ↑ Initially both at start, i marks last unique, j scans ahead