城城城<
城城城<
全部文章
分类
归档
标签
去牛客网
登录
/
注册
城城城<的博客
全部文章
(共74篇)
题解 | #二叉树的最小深度#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { public: /** * * @...
2023-06-11
0
233
题解 | #链表相加(二)#
/** * Definition for singly-linked list. * struct ListNode { * int val; * ListNode *next; * ListNode(int x) : val(x), next(NULL) {} ...
2023-06-11
0
235
题解 | #二叉树根节点到叶子节点的所有路径和#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { public: /** * * @...
2023-06-02
0
243
题解 | #链表中的节点每k个一组翻转#
/** * struct ListNode { * int val; * struct ListNode *next; * }; */ class Solution { public: /** * * @param head ListNode类 ...
2023-06-02
0
229
题解 | #括号生成#
class Solution { public: /** * * @param n int整型 * @return string字符串vector */ vector<string> generateParenthesis(in...
2023-06-02
0
242
题解 | #滑动窗口的最大值#
class Solution { public: vector<int> maxInWindows(const vector<int>& num, unsigned int size) { vector<int> ans; ...
2023-05-23
0
238
题解 | #栈的压入、弹出序列#
#include <vector> class Solution { public: bool IsPopOrder(vector<int> pushV,vector<int> popV) { vector<int> m(1,p...
2023-05-23
0
249
题解 | #丑数#
#include <functional> #include <queue> #include <unordered_map> class Solution { public: int GetUglyNumber_Solution(int index) {...
2023-05-23
0
239
题解 | #二叉搜索树的后序遍历序列#
#include <cmath> #include <vector> class Solution { public: bool VerifySquenceOfBST(vector<int> sequence) { if(sequence....
2023-05-23
0
268
题解 | #序列化二叉树#
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(N...
2023-05-23
0
260
首页
上一页
1
2
3
4
5
6
7
8
下一页
末页