Code essence of humanity :)
https://leetcode.com/problems/kth-largest-element-in-an-array/discuss/60309/C%2B%2B-STL-partition-and-heapsort
There are several methods substantially
Hand line and including swap (), heapInsert (), heapify ()
STL containers priority_queue
STL container multiset ()
Reproduced in: https: //www.jianshu.com/p/8be44524bab9