Pergunta de entrevista da empresa SAP

A question similar to "look for a number in a sorted array"