-
Book Overview & Buying
-
Table Of Contents
Hands-On Data Structures and Algorithms with Python – Third Edition - Third Edition
By :
Exponential search is another search algorithm that is mostly used when we have large numbers of elements in a list. Exponential search is also known as galloping search and doubling search. The exponential search algorithm works in the following two steps:
n data elements, we first determine the subrange in the original list where the desired search item may be presentFirstly, in order to find out the subrange of data elements, we start searching for the desired item in the given sorted array by jumping 2i elements every iteration. Here, i is the value of the index of the array. After each jump, we check if the search item is present between the last jump and the current jump. If the search item is present then we use the binary search algorithm within this subarray, and if it is not present...