摘要:
##068. 查找插入位置 class Solution { public: int searchInsert(vector<int>& nums, int target) { int l=0,r=nums.size(); nums.push_back(1000000);//一定有数比target大 阅读全文
posted @ 2022-03-25 18:43
liv_vil
阅读(23)
评论(0)
推荐(0)
摘要:
##059. 数据流的第 K 大数值 class KthLargest { public: priority_queue<int,vector<int>,greater<int>>heap;//小根堆 维护第1大到第k大的数 top就是第k大的数 int k;//太妙了 /* 第n大 n-1 n-2 阅读全文
posted @ 2022-03-25 15:48
liv_vil
阅读(27)
评论(0)
推荐(0)

浙公网安备 33010602011771号