《剑指Offer》刷题笔记——面试题55 II. 平衡二叉树

lihai36289 4 0 PDF 2020-12-23 01:12:31

难度:简单 一、题目描述: 二、解题分析: 1、剑指解析 I、自顶向下 II、自底向上 2、代码实现 I、自顶向下 # Definition for a binary tree node. # class TreeNode: # def __init__(self, x): # self.val = x # self.left = None # self.right = None class Solution: # Compute the tree's height via recursion def height(

用户评论
请输入评论内容
评分:
暂无评论