P59 - 构造高度平衡二叉树
Construct height-balanced binary trees
官方模块:
Problems.P59核心函数:heightBalancedTrees
← P58 对称且完全平衡的二叉树 | P60 给定节点数的高度平衡二叉树 →
← P58 对称且完全平衡的二叉树 | P60 给定节点数的高度平衡二叉树 →
题目描述
构造所有高度为 H 的高度平衡二叉树。
函数签名
思路
实现
测试
1-- >>>
Construct height-balanced binary trees
官方模块:
Problems.P59核心函数:heightBalancedTrees
← P58 对称且完全平衡的二叉树 | P60 给定节点数的高度平衡二叉树 →
← P58 对称且完全平衡的二叉树 | P60 给定节点数的高度平衡二叉树 →
构造所有高度为 H 的高度平衡二叉树。
1-- >>>