Goldman Sachs Interview Question

Binary search - leetcode medium problem