145k views
2 votes
The quicksort pivot value should be the key value of an actual data item; this item is called the pivot. True or False?

1 Answer

4 votes

Answer:

True.

Step-by-step explanation:

the pivot element in quick sort is the the value of an element present in the array that is present in the array.The pivot is the most important element in the quick sort because the time complexity of the quick sort depends upon the pivot element.

If the pivot selected in the array is always the highest or the lowest element then the time complexity of the quick sort becomes O(N²) other wise the average time complexity of quick sort is O(NlogN).

User Fpilee
by
6.1k points