Pergunta de entrevista da empresa EAB

Find a magic index of the array: index number = element, using O(logn) approach.