Kth Largest Element in an Array (LC #215) appears frequently at Meta. While a min-heap of size works in , Meta interviewers prefer QuickSelect which averages . Pick a pivot, partition so elements greater than pivot are on one side. If pivot lands at position , return it. Otherwise recurse on the correct half. Randomize pivot to avoid worst case. Meta asks variants: kth largest across multiple arrays, kth smallest element from sorted lists. Know both heap and QuickSelect approaches.
##### ###### ##### ### # # ### # # ###### ## ## ## ## ## ## ## # # # # # ## ##### #### ##### # # # # # # # #### ## # ## ## ## ## # # # # # ## ## # ###### ## ### # ### # ######
$ curl repovive.com/roadmaps/meta-interview-prep/sorting-searching/kth-largest-element-in-an-array
░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░░██████████████████████████████████████████████████████████████████████████████████████████████████