Amazon Interview Question

Leetcode Balloon and arrow question