牛客768685351号
牛客768685351号
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛客768685351号的博客
全部文章
/ 题解
(共160篇)
题解 | #二叉搜索树与双向链表#
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(NULL) { } };*/ class ...
C++
2022-02-27
0
350
题解 | #找到搜索二叉树中两个错误的节点#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { private: vector<int> v...
C++
2022-02-27
0
303
题解 | #通配符匹配#
此题目和链接NC 122 正则表达式匹配有点类似,但两者的动态规划的递推式是有区别的。 class Solution { public: bool isMatch(const char *s, const char *p) { string str(s); s...
C++
2022-02-27
0
429
题解 | #正则表达式匹配#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param str string字符串 * @param pattern string字...
C++
2022-02-27
0
346
题解 | #矩阵最长递增路径#
参考:https://leetcode-cn.com/problems/fpTFWP/solution/zui-chang-di-zeng-lu-jing-by-leetcode-so-1chr/ class Solution { private: static constexpr int ...
C++
2022-02-27
0
322
题解 | #判断t1树中是否有与t2树完全相同的子树#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { public: /** * * @...
C++
2022-02-27
0
330
题解 | #合并二叉树#
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * }; */ class Solution { public: /** * * @...
C++
2022-02-27
0
351
题解 | #N皇后问题#
class Solution { private: int res = 0; public: /** * * @param n int整型 the n * @return int整型 */ int Nqueen(int n) { ...
C++
2022-02-27
0
331
题解 | #把二叉树打印成多行#
/* struct TreeNode { int val; struct TreeNode *left; struct TreeNode *right; TreeNode(int x) : val(x), left(NULL), right(N...
C++
2022-02-27
0
271
题解 | #连续子数组的最大乘积#
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型vector * @return int整型 ...
C++
2022-02-27
0
360
首页
上一页
2
3
4
5
6
7
8
9
10
11
下一页
末页