Google Interview Question

Modified binary search of some kind.. Can't get too specific ):