摘要:
普通二叉树 BST平衡二叉树 阅读全文
posted @ 2019-02-01 18:49
Roni_i
阅读(154)
评论(0)
推荐(0)
摘要:
private boolean isBalanced = true; public boolean IsBalanced_Solution(TreeNode root) { height(root); return isBalanced; } public int height(TreeNode root) { ... 阅读全文
posted @ 2019-02-01 18:21
Roni_i
阅读(103)
评论(0)
推荐(0)
摘要:
class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { this.val = val; } } public class Solution { public int Tree... 阅读全文
posted @ 2019-02-01 18:08
Roni_i
阅读(103)
评论(0)
推荐(0)
摘要:
/** * Definition for a binary tree node. * public class TreeNode { * int val; * TreeNode left; * TreeNode right; * TreeNode(int x) { val = x; } * } */ class Solution { i... 阅读全文
posted @ 2019-02-01 14:20
Roni_i
阅读(86)
评论(0)
推荐(0)
摘要:
序列化二叉树 59ms 阅读全文
posted @ 2019-02-01 13:15
Roni_i
阅读(130)
评论(0)
推荐(0)
摘要:
/*输入一棵二叉搜索树,将该二叉搜索树转换成一个排序的双向链表。要求不能创建任何新的结点,只能调整树中结点指针的指向。 */ class TreeNode { int val = 0; TreeNode left = null; TreeNode right = null; public TreeNode(int val) { this.va... 阅读全文
posted @ 2019-02-01 01:34
Roni_i
阅读(104)
评论(0)
推荐(0)