Kth Largest Element (QuickSelect)
Target Index = N - K. QuickSelect partitions array until Pivot lands on Target Index.
Target K
2
Target Index (N-K)
-
Search Range
[0, N-1]
Pivot
Less
Greater
Found
當前步驟
Ready.
步驟 0 / 0
邏輯解釋
C++ Code