1.

What will be the order of elements of the array arr = {23, 67, 143, 654, 43} after first iteration of MSD sort is complete?(a) 23, 43, 67, 143, 654(b) 23, 67, 43, 143, 654(c) 23, 67, 143, 654, 43(d) 23, 143, 43, 654, 67I got this question in an online quiz.My question is based upon Sorting in portion Sorting of Data Structures & Algorithms II

Answer»

The correct answer is (b) 23, 67, 43, 143, 654

Easiest explanation - In the first ITERATION the array is sorted according to the most significant digit I.e. HUNDREDS place value. So the ORDER of elements will be 23, 67, 43, 143, 654.



Discussion

No Comment Found

Related InterviewSolutions