The following article explains Jump Search:
http://www.geeksforgeeks.org/jump-search/
The last step is a linear search. Why can't we use binary search if the array is already sorted and time complexity of binary search is log(n) while of the linear search it is n?
The use case for jump search (O(√n)) over binary search (O(log n)) is when jumping back is expensive. Replacing the linear search in jump search would be counterproductive in that regard.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With