+1 vote
in Data Structures & Algorithms II by (110k points)
What is the general form of Shell’s increments?

(a) 1,2,3,…,n

(b) 1,3,7,….,2k-1

(c) 1,3,5,7,….,k-1

(d) 1,5,10,15,…, k-1

I have been asked this question by my college professor while I was bunking the class.

Query is from Shell sort topic in division Sorting of Data Structures & Algorithms II

1 Answer

+1 vote
by (614k points)
selected by
 
Best answer
Correct choice is (b) 1,3,7,….,2k-1

Easy explanation - Shell’s increments are of the form 1,3,7,….,2k-1. The key difference is that the consecutive elements have no common factors.

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

...