QuickSelect Algorithm Understanding

前端 未结 6 1514
情深已故
情深已故 2020-12-04 15:58

I\'ve been poring over various tutorials and articles that discuss quicksort and quickselect, however my understanding of them is still shaky.

Given this code struct

6条回答
  •  佛祖请我去吃肉
    2020-12-04 16:13

    Partition is pretty simple: it rearranges the elements so those less than a selected pivot are at lower indices in the array than the pivot and those larger than the pivot are at higher indices in the array.

    I talked about the rest it in a previous answer.

提交回复
热议问题