Pregunta de entrevista de Uber

Celebrity Problem , Question based on binary search