摘要:
class Solution { public: bool searchMatrix(vector<vector<int>>& matrix, int target) { int i = matrix.size()-1; int j = 0; while(i>=0&&j<matrix[0].size 阅读全文
posted @ 2021-07-24 13:57
三一一一317
阅读(29)
评论(0)
推荐(0)
摘要:
class Solution { public: vector<int> maxSlidingWindow(vector<int>& nums, int k) { priority_queue<pair<int ,int>> q; vector<int> res; //规则:pair的比较,先比较第 阅读全文
posted @ 2021-07-24 13:40
三一一一317
阅读(32)
评论(0)
推荐(0)
摘要:
class Solution { public: vector<int> productExceptSelf(vector<int>& nums) { if(nums.size()==0) return {}; vector<int> a(nums.size(),1); vector<int> b( 阅读全文
posted @ 2021-07-24 11:26
三一一一317
阅读(33)
评论(0)
推荐(0)
摘要:
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode() : val(0), next(nullptr) {} * ListNode(int x) : 阅读全文
posted @ 2021-07-24 11:13
三一一一317
阅读(23)
评论(0)
推荐(0)
摘要:
/** * Definition for a binary tree node. * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode() : val(0), left(nullptr), rig 阅读全文
posted @ 2021-07-24 10:34
三一一一317
阅读(22)
评论(0)
推荐(0)