Implement binary search from scratch | Uber Interview Question