叫什么都行呀
叫什么都行呀
全部文章
分类
题解(1)
归档
标签
去牛客网
登录
/
注册
叫什么都行呀的博客
全部文章
(共32篇)
题解 | #判断是不是完全二叉树#
class Solution: def isCompleteTree(self , root: TreeNode) -> bool: # write code here list_temp2=[]#存结点 now=root ...
2022-11-02
0
262
题解 | #按之字形顺序打印二叉树#
class Solution: def Print(self , pRoot: TreeNode) -> List[List[int]]: # write code here a=0 b=0 flag=0 ...
2022-11-01
0
398
题解 | #求二叉树的层序遍历#
class Solution: def levelOrder(self , root: TreeNode) -> List[List[int]]: # write code here a=0 #记录当前层还未处理的节点数量 b=0 #记录下一层的节点数量 list_temp1=[]#存值 li...
2022-11-01
1
276
题解 | #判断是不是二叉搜索树#
bool isValidBST(struct TreeNode* root ) { // write code here ...
C
递归
二叉搜索树
2022-10-04
3
372
题解 | #二叉搜索树的最近公共祖先#
int lowestCommonAncestor(struct TreeNode* root, int p, int q ) { // write&nb...
C
二叉树
递归
2022-10-04
0
267
题解 | #对称的二叉树#
bool isSymmetricalTree(struct TreeNode* pRoot, struct TreeNode* pRoot2) { if (pRoot&nb...
C
二叉树
递归
2022-10-04
0
258
题解 | #二叉树的镜像#
struct TreeNode* Mirror(struct TreeNode* pRoot ) { // write code here  ...
C
二叉树
递归
2022-10-01
0
208
题解 | #合并二叉树#
struct TreeNode* mergeTrees(struct TreeNode* t1, struct TreeNode* t2 ) { // ...
C
二叉树
递归
2022-10-01
0
237
题解 | #二叉树中和为某一值的路径(一)#
bool hasPathSum(struct TreeNode* root, int sum ) { // write code here ...
C
二叉树
栈
2022-09-30
0
330
题解 | #二叉树的最大深度#
int maxDepth(struct TreeNode* root ) { // write code here if&n...
C
二叉树
递归
2022-09-30
2
257
首页
上一页
1
2
3
4
下一页
末页