- Time complexity : O(n)
- Space complexity : O(1)
- Time complexity : O(log(n))
- Space complexity :
-
Itterative version - O(1)
-
Recursive version - O(n)
- Time complexity : O(√n)
- Space complexity : O(1)
- Time complexity : O(log(log(n)))
- Space complexity : O(1)
Time Complexity increases with the increase in non uniformity of data. For uniformily distributed data Interpolation Search is better than Binary Search while it keeps on changing as uniformity of data changes and go upto O(n), while in case of Binary search its O(log(n)) dispite of how data is distributed in shorted array. Here is the average complexity considering most data to be uniform.
- Time complexity : O(log(n))
- Space complexity :
-
Itterative version - O(1)
-
Recursive version - O(n)
Time Complexity depends on binary search only not exponential searcch(O(1)). The Exponential Search is better than Binary Search in every case specially for UNBOUNDED ARRAYS
- Time complexity : O(log(n))
- Space complexity : O(1)
- Time complexity : O(n²)
- Space complexity : O(1)
- Time complexity : O(n²)
- Space complexity : O(1)
- Time complexity : O(n²)
- Space complexity : O(1)
- Time complexity : O(n)
- Space complexity : O(1)
- Time complexity : O(n + Range) ~ O(n)
- Space complexity : O(Range)