Pergunta de entrevista da empresa Uber

Celebrity Problem , Question based on binary search