Test Yantra Interview Question

Write a binary search code on a list to find an element.