1.

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-1I 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

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.



Discussion

No Comment Found

Related InterviewSolutions