Implement lower_bound and upper_bound binary search | Amazon Interview Question