This is the binarySearch that search the array linearly