Class Solution
java.lang.Object
g0101_0200.s0110_balanced_binary_tree.Solution
110 - Balanced Binary Tree.<p>Easy</p>
<p>Given a binary tree, determine if it is height-balanced.</p>
<p>For this problem, a height-balanced binary tree is defined as:</p>
<p>> a binary tree in which the left and right subtrees of <em>every</em> node differ in height by no more than 1.</p>
<p><strong>Example 1:</strong></p>
<p><img src="https://assets.leetcode.com/uploads/2020/10/06/balance_1.jpg" alt="" /></p>
<p><strong>Input:</strong> root = [3,9,20,null,null,15,7]</p>
<p><strong>Output:</strong> true</p>
<p><strong>Example 2:</strong></p>
<p><img src="https://assets.leetcode.com/uploads/2020/10/06/balance_2.jpg" alt="" /></p>
<p><strong>Input:</strong> root = [1,2,2,3,3,null,null,4,4]</p>
<p><strong>Output:</strong> false</p>
<p><strong>Example 3:</strong></p>
<p><strong>Input:</strong> root = []</p>
<p><strong>Output:</strong> true</p>
<p><strong>Constraints:</strong></p>
<ul>
<li>The number of nodes in the tree is in the range <code>[0, 5000]</code>.</li>
<li><code>-10<sup>4</sup> <= Node.val <= 10<sup>4</sup></code></li>
</ul>
-
Constructor Summary
Constructors -
Method Summary
-
Constructor Details
-
Solution
public Solution()
-
-
Method Details
-
isBalanced
-