李顺利plus
李顺利plus
全部文章
分类
题解(15)
归档
标签
去牛客网
登录
/
注册
李顺利plus的博客
全部文章
(共90篇)
题解 | #合并两个排序的链表#
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/ class Solution { public: ListNode* Merge...
2023-01-04
0
309
题解 | #二叉树的下一个结点#
class Solution { public: int flag = 0; struct TreeLinkNode* res; //返回值 struct TreeLinkNode* son; //记录给出的子树根节点 void bianli(Tree...
2023-01-03
0
360
题解 | #和为S的连续正数序列#
class Solution { public: vector<vector<int> > FindContinuousSequence(int sum) { vector<vector<int> > res; ...
2023-01-02
0
261
题解 | #和为S的连续正数序列#
class Solution { public: vector<vector<int> > FindContinuousSequence(int sum) { vector<vector<int> > res; ...
2023-01-02
0
257
题解 | #字符流中第一个不重复的字符#
class Solution { public: //Insert one char from stringstream vector<char> res; unordered_map<char, int> mp; void Insert(ch...
2023-01-02
0
267
题解 | #把字符串转换成整数(atoi)#
class Solution { public: const int min = pow(2,31) * (-1); const int max = pow(2,31) - 1; int StrToInt(string s) { int sign = 0...
2023-01-02
0
309
题解 | #二叉树中和为某一值的路径(二)#
class Solution { public: vector<vector<int> > res; void find(TreeNode* p,vector<int> rec,int target){ vector<int> record;...
2023-01-02
0
276
题解 | #旋转数组的最小数字#
class Solution { public: int minNumberInRotateArray(vector<int> rotateArray) { int left = 0, right = rotateArray.size()-1; w...
2023-01-01
0
305
题解 | #丑数#
class Solution { public: int GetUglyNumber_Solution(int index) { if (index <= 6) return index; // 三个变量 后面有大作用! ...
2023-01-01
0
315
题解 | #孩子们的游戏(圆圈中最后剩下的数)#
class Solution { public: int LastRemaining_Solution(int n, int m) { queue<int> res; for(int i=0;i<n;i++) res.push(i); ...
2023-01-01
0
277
首页
上一页
1
2
3
4
5
6
7
8
9
下一页
末页