1.

The given array is arr = {2,6,1}. What are the pivots that are returned as a result of subsequent partitioning?(a) 1 and 6(b) 6 and 1(c) 2 and 6(d) 1I got this question in an internship interview.The origin of the question is Quicksort topic in division Sorting of Data Structures & Algorithms II

Answer»

Correct answer is (d) 1

Easiest explanation - There is only one PIVOT with which the array will be SORTED, the pivot is 1.



Discussion

No Comment Found

Related InterviewSolutions