Like jump search, this is also a modified version of the linear search algorithm. It works as follows:
- Step 1: We jump to indexes exponentially. Here, the jump step would be 1, 2, 4, 8, 16,...,i/2, i, 2i, 4i,... Notice that this is the same as jump search.
- Step 2: We keep on jumping the steps exponentially until we get a value greater than the search element. Notice that this is also the same as we did in jump search.
- Step 3: Once we get a value greater than the search element (for example, at the i index), we are sure that the search element is between the i/2th and ith index. Notice that this is also the same as jump search.
- Step 4: Now do a binary search between these two indexes.
As all the steps followed here are similar to the jump search technique (except the last one, where we do a binary search instead), use any of the existing examples and perform...