1.

What does the number of inversions in an array indicate?(a) mean value of the elements of array(b) measure of how close or far the array is from being sorted(c) the distribution of values in the array(d) median value of the elements of arrayThe origin of the question is Arrays Types in chapter Arrays Types of Data Structures & Algorithms IThis question was posed to me in semester exam.

Answer»

Correct choice is (b) measure of how CLOSE or far the array is from being SORTED

For EXPLANATION: The number of inversions in an array INDICATES how close or far the array is from being completely sorted. The array is sorted if the number of inversions are 0.



Discussion

No Comment Found

Related InterviewSolutions