Reduced the binary search space complexity