In which of the following case jump search will be preferred over exponential search?
jumping backwards takes significantly more time than jumping forward
jumping forward takes significantly more time than jumping backwards
when the given array is very large in size
when the given array is very small in size
View Answer
Correct Answer: A — jumping backwards takes significantly more time than jumping forward
Explanation:
Jump search only needs to jump backwards once, while an exponential search can jump backwards up to log n times. Thus jump search will be preferred if jumping backwards is expensive.
