摘要: 地址:https://leetcode-cn.com/problems/n-ary-tree-preorder-traversal/ /** * Definition for a Node. * class Node { * public $val = null; * public $childre 阅读全文
posted @ 2020-05-22 11:14 花花妹子。 阅读(109) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/n-ary-tree-postorder-traversal/ /** * Definition for a Node. * class Node { * public $val = null; * public $childr 阅读全文
posted @ 2020-05-22 11:04 花花妹子。 阅读(126) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/increasing-order-search-tree/ /** * Definition for a binary tree node. * class TreeNode { * public $val = null; * 阅读全文
posted @ 2020-05-22 10:52 花花妹子。 阅读(122) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/maximum-depth-of-n-ary-tree/ <?php /** 559. N叉树的最大深度 给定一个 N 叉树,找到其最大深度。 最大深度是指从根节点到最远叶子节点的最长路径上的节点总数。 例如,给定一个 3叉树 阅读全文
posted @ 2020-05-22 10:33 花花妹子。 阅读(112) 评论(0) 推荐(0) 编辑
摘要: 地址:https://leetcode-cn.com/problems/convert-sorted-array-to-binary-search-tree/ <?php /** 108. 将有序数组转换为二叉搜索树 将一个按照升序排列的有序数组,转换为一棵高度平衡二叉搜索树。 本题中,一个高度平衡 阅读全文
posted @ 2020-05-22 10:20 花花妹子。 阅读(102) 评论(0) 推荐(0) 编辑