PhonePe Interview Question

Max Min using Binary Search