Pergunta de entrevista da empresa Cognizant

Algorithm Question like logarithm and search