網頁

2025年6月28日 星期六

Py3排序 C++nth_element速解Leetcode 2099 Find Subsequence of Length K With t...


Py3排序 C++nth_element速解Leetcode 2099  Find Subsequence of Length K With the Largest Sum
C++的nth_element很好用,基本上是做partition,在這個問題可取代sort
----
C++'s nth_element is very useful. It basically does partitioning and can replace sort in this problem.