Pregunta de entrevista de Blinkit

Binary search-based question, medium level