Let's begin!
It's a Searching Algorithm with average time complexity as root n.
Instead of going one by one through elements (like linear search), it jumps from element to element in a sorted array. The jump value is root of the length of array.
If target element is found return true.
Else If current element is less than target and within the range call the function with change parameters.
Else If current element is greater than target and within the range call the function with change parameters.
Else return false.
Comments
Post a Comment