Leetcode——面試題40. 最小的k個數

用優先級隊列來模擬一個k個元素的大根堆。web class Solution { public: vector<int> getLeastNumbers(vector<int>& arr, int k) { if(k==0) { vector<int> re; re.resize(0);
相關文章
相關標籤/搜索