1.

How many sub arrays does the quick sort algorithm divide the entire array into?(a) one(b) two(c) three(d) fourThe question was asked in a job interview.My doubt is from Quicksort topic in division Sorting of Data Structures & Algorithms II

Answer»

The correct choice is (b) two

The BEST I can explain: The entire ARRAY is divided into two partitions, 1st sub array CONTAINING ELEMENTS less than the pivot element and 2ND sub array containing elements greater than the pivot element.



Discussion

No Comment Found

Related InterviewSolutions