Upper Bound Using Binary Search Algorithm C