+1 vote
in Data Structures & Algorithms II by (110k points)
How many sub arrays does the quick sort algorithm divide the entire array into?

(a) one

(b) two

(c) three

(d) four

The question was asked in a job interview.

My doubt is from Quicksort topic in division Sorting of Data Structures & Algorithms II

1 Answer

+1 vote
by (614k points)
selected by
 
Best 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.

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

...