Amazon and Google ask this problem. It tests greedy two-pointer thinking, which is harder than standard two-pointer problems. The main skill: proving your greedy choice is correct. Interviewers want to hear you explain why moving the shorter pointer is always safe. If you can articulate this proof, you've shown deep algorithmic understanding. This pattern applies to Trapping Rain Water (harder), which is also a top interview problem.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/maang-interview-prep/two-pointers-sliding-window/container-with-most-water-why-this-problem
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░████████████████████████████████████████████████████████████████████████████████████████████████████████████████████████