QuickSelect Algorithm Understanding
The important part in quick select is partition. So let me explain that first. Partition in quick select picks a pivot (either randomly or first/last element). Then it rearranges the list in a way that all elements less than pivot are on left side of pivot and others on right. It then returns index of … Read more