+1 vote
in Data Structures & Algorithms II by (110k points)
What is the value of jump taken for maximum efficiency while implementing jump search?

(a) n/2

(b) n^2

(c) n^1/2

(d) log n

I had been asked this question in a national level competition.

I need to ask this question from Searching topic in chapter Searching of Data Structures & Algorithms II

1 Answer

+1 vote
by (614k points)
selected by
 
Best answer
Correct choice is (c) n^1/2

For explanation: Total number of comparisons required will be n/k + k-1 in worst case. This function will be minimum for k=n^1/2. So this value of jump will be the best for implementing jump search.

Related questions

Welcome to TalkJarvis QnA, a question-answer community website for the people by the people. On TalkJarvis QnA you can ask your doubts, curiosity, questions and whatever going in your mind either related to studies or others. Experts and people from different fields will answer.

Categories

...