牛客768685351号
牛客768685351号
全部文章
分类
题解(160)
归档
标签
去牛客网
登录
/
注册
牛客768685351号的博客
全部文章
(共163篇)
题解 | #括号生成#
class Solution { private: string path = ""; vector<string> res; vector<char> src = {'(', ')'}; public: /** * * ...
C++
2022-02-25
0
295
题解 | #数字字符串转化成IP地址#
用回溯算法来解决这个问题,需要注意的是一些细节,定义出什么时候认为是正确的答案; class Solution { private: string path = ""; vector<string> res; public: /** * * ...
C++
2022-02-25
0
304
题解 | #滑动窗口的最大值#
class Solution { public: vector<int> maxInWindows(const vector<int>& num, unsigned int size) { if(num.size() < size || ...
C++
2022-02-25
0
245
题解 | #缺失的第一个正整数#
参考:https://leetcode-cn.com/problems/first-missing-positive/solution/que-shi-de-di-yi-ge-zheng-shu-by-leetcode-solution/ class Solution { public: /...
C++
2022-02-25
0
287
题解 | #矩阵元素查找#
class Solution { public: vector<int> findElement(vector<vector<int> > mat, int n, int m, int x) { // write code here ...
C++
2022-02-25
0
268
题解 | #有重复项数字的全排列#
class Solution { private: vector<vector<int>> res; vector<int> path; public: vector<vector<int> > permuteUni...
C++
2022-02-25
0
259
题解 | #删除有序链表中重复的元素-I#
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x): val(x), next(nullptr) {}; * }; */ class Solution { public: ...
C++
2022-02-25
0
246
题解 | #判断一棵二叉树是否为搜索二叉树和完全二叉树#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { private: vector<int> i...
C++
2022-02-25
0
311
题解 | #在两个长度相等的排序数组中找到上中位数#
class Solution { public: /** * find median in two sorted array * @param arr1 int整型vector the array1 * @param arr2 int整型vector the a...
C++
2022-02-25
0
315
题解 | #删除有序链表中重复的元素-II#
/** * struct ListNode { * int val; * struct ListNode *next; * ListNode(int x): val(x), next(nullptr) {}; * }; */ class Solution { public: ...
C++
2022-02-24
0
225
首页
上一页
6
7
8
9
10
11
12
13
14
15
下一页
末页