Suppose we have a sorted array of n numbers, A[1] ≤ A[2] ≤ ... ≤A[n].
Write an algorithm that searches the array to see if thisarray contains a particular number x.
If the number is present then report index of the number,otherwise report nil.
The algorithm time complexity should not be higher than O(logn)
Suppose we have a sorted array of n numbers, A[1] ≤ A[2] ≤ ... ≤ A[n]. Write an algorithm that searches the array to see
-
- Site Admin
- Posts: 899603
- Joined: Mon Aug 02, 2021 8:13 am