Cognizant Interview Question

Algorithm Question like logarithm and search