牛客159707358号
牛客159707358号
全部文章
分类
归档
标签
去牛客网
登录
/
注册
牛客159707358号的博客
TA的专栏
40篇文章
0人订阅
剑指offer回顾
40篇文章
116人学习
全部文章
(共99篇)
题解 | 剪绳子
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param n int整型 * @return int整型 */ in...
2025-02-28
0
59
题解 | 二叉树的下一个结点
/* struct TreeLinkNode { int val; struct TreeLinkNode *left; struct TreeLinkNode *right; struct TreeLinkNode *next; TreeLinkNode(i...
2025-02-28
0
42
题解 | 重建二叉树 递归 前序和中序可以切分为小树的前序中序
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {...
2025-02-28
0
42
题解 | 顺时针打印矩阵
class Solution { public: vector<int> printMatrix(vector<vector<int> > matrix) { int top=0; int left=0; i...
2025-02-27
0
46
题解 | 翻转单词序列
class Solution { public: string ReverseSentence(string str) { if(str.empty()) { return str; } vector&l...
2025-02-27
0
78
题解 | 调整数组顺序使奇数位于偶数前面(二)
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param array int整型vector * @return int整型vecto...
2025-02-27
0
76
题解 | 判断是不是平衡二叉树
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {...
2025-02-27
0
53
题解 | 构建乘积数组
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param A int整型vector * @return int整型vector ...
2025-02-27
0
42
题解 | 扑克牌顺子
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param numbers int整型vector * @return bool布尔型 ...
2025-02-27
0
58
题解 | 跳台阶
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param number int整型 * @return int整型 */ ...
2025-02-27
0
57
首页
上一页
1
2
3
4
5
6
7
8
9
10
下一页
末页