> For the complete documentation index, see [llms.txt](https://851958789.gitbook.io/notes/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://851958789.gitbook.io/notes/0215_kth_largest_element_in_an_array/slt.md).

# 思路1 利用快排的partition

首先假设一共n个数，第k大，就是正数n-k+1个数，目标索引就是n-k

利用快排的partition返回目标索引的原理
