Leetcode 297 C Binary Search Algorithm