牛马ID
牛马ID
全部文章
题解
归档
标签
去牛客网
登录
/
注册
牛马ID的博客
全部文章
/ 题解
(共66篇)
题解 | #重建二叉树#
import java.util.*; /** * Definition for binary tree * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * T...
Java
2022-04-23
0
292
题解 | #序列化二叉树#
/* public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { this.val = va...
Java
2022-04-23
0
326
题解 | #在二叉树中找到两个节点的最近公共祖先#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * } */ public class Sol...
Java
2022-04-23
0
275
题解 | #二叉搜索树的最近公共祖先#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * public TreeNode(int v...
Java
2022-04-23
0
248
题解 | #判断是不是平衡二叉树#
public class Solution { public boolean IsBalanced_Solution(TreeNode root) { if(root == null) return true; if(Math.abs(getHegih(roo...
Java
2022-04-23
0
227
题解 | #判断是不是完全二叉树#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * public TreeNode(int v...
Java
2022-04-21
0
302
题解 | #判断是不是二叉搜索树#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * public TreeNode(int v...
Java
2022-04-21
0
286
题解 | #二叉树的镜像#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * public TreeNode(int v...
Java
2022-04-21
0
268
题解 | #合并二叉树#
import java.util.*; /* * public class TreeNode { * int val = 0; * TreeNode left = null; * TreeNode right = null; * } */ public class Sol...
Java
2022-04-21
0
221
题解 | #对称的二叉树#
/* public class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { this.val = va...
Java
2022-04-21
0
272
首页
上一页
1
2
3
4
5
6
7
下一页
末页