[39.] Offer to prove safety to achieve a balanced binary tree python

Title Description

Input binary tree, the binary tree is determined whether a balanced binary tree.

# -*- coding:utf-8 -*-
# class TreeNode:
#     def __init__(self, x):
#         self.val = x
#         self.left = None
#         self.right = None
class Solution:
    def IsBalanced_Solution(self, pRoot):
        # write code here
Published 99 original articles · won praise 6 · views 3954

Guess you like

Origin blog.csdn.net/weixin_42247922/article/details/104021555