Computer Science, asked by geetikawadhwa22, 7 months ago

what is the importance of pivot element in quick sort

Answers

Answered by melfidu13157
6

hey mate,

heres ur answer,

quicksort algorithm should always aim to choose the middle-most element as its pivot. ... This ends up being super crucial because we want the two partitioned halves — the elements smaller than the pivot and the elements larger than the pivot — to be mostly equal.

Quicksort is a divide-and-conquer algorithm. It works by selecting a 'pivot' element from the array and partitioning the other elements into two sub-arrays, according to whether they are less than or greater than the pivot. The sub-arrays are then sorted recursively.

PLZ MARK ME AS BRAINLIEST PLZZ CLICK THANKS RATE THE ANSWER ALSO

please go to www.billboard. com vote 2021 and vote for bts map of soul 7.....

thank u....purple u....

Similar questions