简单就好201710200501870
简单就好201710200501870
全部文章
题解
归档
标签
去牛客网
登录
/
注册
简单就好201710200501870的博客
全部文章
/ 题解
(共17篇)
题解 | #跳台阶扩展问题#
/*第一种解法 递归*/ class Solution { public: int jumpFloorII(int number) { if(number == 1 || number == 0) return 1; return 2 ...
2021-07-27
0
357
题解 | #跳台阶#
/* 记忆化搜索*/ class Solution { public: /*记忆化搜索*/ int F[10000] = {1,1}; int jumpFloor(int number) { if(number == 0 || number == 1) ...
2021-07-27
0
329
题解 | #二叉树的最大深度#
class Solution { public: /** * * @param root TreeNode类 * @return int整型 */ int maxDepth(TreeNode* root) { // writ...
2021-07-27
0
364
题解 | #跳台阶#
/*使用递归*/ class Solution { public: int jumpFloor(int number) { if(number == 1) return 1; else if(number==2) ...
2021-07-27
0
245
题解 | #平衡二叉树#
class Solution { public: int TreeDepth(TreeNode* pRoot) //计算二叉树深度 { if(pRoot == NULL) { return 0; } ...
2021-07-27
0
307
题解 | #二叉树的深度#
class Solution { public: int TreeDepth(TreeNode* pRoot) { if(pRoot == NULL) return 0; return max(1+TreeDepth(pRoot->...
2021-07-27
0
304
题解 | #二叉树的镜像#
struct TreeNode* Mirror(struct TreeNode* pRoot ) { // write code here if(pRoot == NULL) return pRoot; struct TreeNode* tmp = NULL;...
2021-07-27
0
407
首页
上一页
1
2
下一页
末页