牛客768685351号
牛客768685351号
全部文章
分类
题解(160)
归档
标签
去牛客网
登录
/
注册
牛客768685351号的博客
全部文章
(共163篇)
题解 | #二叉树的最大深度#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { public: /** * * @...
C++
2022-02-21
0
229
题解 | #重建二叉树#
/** * Definition for binary tree * struct TreeNode { * int val; * TreeNode *left; * TreeNode *right; * TreeNode(int x) : val(x),...
C++
2022-02-21
0
287
题解 | #将升序数组转化为平衡二叉搜索树#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(NULL), right(NULL) {} * ...
C++
2022-02-21
0
304
题解 | #大数乘法#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * @param s string字符串 第一个整数 * @param t string字符串 第二个整数 ...
C++
2022-02-21
0
300
题解 | #二叉树中和为某一值的路径(二)#
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } };*/ class...
C++
2022-02-21
0
262
题解 | #二叉树中和为某一值的路径(一)#
DFS求解 * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { private: int res = false; ...
C++
2022-02-21
0
303
题解 | #买卖股票的最好时机(一)#
public: /** * * @param prices int整型vector * @return int整型 */ int maxProfit(vector<int>& prices) { // w...
C++
2022-02-20
0
270
题解 | #二叉树中的最大路径和#
* struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { private: int res = INT_MIN; publi...
C++
2022-02-20
0
254
题解 | #二叉树根节点到叶子节点的所有路径和#
* struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { private: int res = 0; int cur...
C++
2022-02-20
0
247
题解 | #链表中环的入口结点#
struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } }; */ class Solution { public: ...
C++
2022-02-20
0
278
首页
上一页
8
9
10
11
12
13
14
15
16
17
下一页
末页