BinarySearch impl.