Pergunta de entrevista da empresa Block

A question based on Binary Search.