+1 vote
in Data Structures & Algorithms II by (110k points)
An array that is first 7-sorted, then 5-sorted becomes _________

(a) 7-ordered

(b) 5-ordered

(c) both 2-ordered and 5-ordered

(d) both 7-ordered and 5-ordered

This question was addressed to me in an online quiz.

My question is from Shell sort in division Sorting of Data Structures & Algorithms II

1 Answer

+1 vote
by (614k points)
selected by
 
Best answer
The correct option is (d) both 7-ordered and 5-ordered

The best explanation: An array that is 7-sorted, becomes 7-ordered. And an array that is 5-sorted, becomes 5-ordered. If k-ordered array is h-sorted, it remains k-ordered. Thus, an array that is first 7-sorted, then 5-sorted becomes both 7-ordered and 5-ordered.

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

...