nn123456
nn123456
全部文章
分类
归档
标签
去牛客网
登录
/
注册
nn123456的博客
全部文章
(共8篇)
题解 | 二叉搜索树的后序遍历序列
#include <climits> class Solution { public: bool VerifySquenceOfBST(vector<int> sequence) { //辅助遍历,null if(sequence.size...
2025-10-14
1
17
题解 | 判断是不是完全二叉树
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {...
2025-09-23
0
24
题解 | 判断是不是完全二叉树
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {...
2025-09-23
0
22
题解 | 按之字形顺序打印二叉树
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {...
2025-09-21
0
23
题解 | 二叉树中和为某一值的路径(一)
/** * struct TreeNode { * int val; * struct TreeNode *left; * struct TreeNode *right; * TreeNode(int x) : val(x), left(nullptr), right(nullptr) {...
2025-09-13
0
26
题解 | 两个链表的第一个公共结点
/* struct ListNode { int val; struct ListNode *next; ListNode(int x) : val(x), next(NULL) { } };*/ class Solution { public: ListNode* FindF...
2025-09-10
1
16
题解 | 二分查找-I
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param nums int整型vector * @param target int整型...
2025-09-07
1
20
题解 | 数组中重复的数字
class Solution { public: /** * 代码中的类名、方法名、参数名已经指定,请勿修改,直接返回方法规定的值即可 * * * @param numbers int整型vector * @return int整型 ...
2025-09-07
1
34