Walk a pair of indices inward (or together) to avoid nested loops.
Pick two walls that trap the most water — one linear two-pointer pass.
Find every unique triplet that sums to zero — sort, then two-pointer.
Sum the water trapped between bars — two pointers, O(1) space.