Skip to content

Files

Latest commit

 

History

History

⭐ Balanced Binary Tree

Folders and files

NameName
Last commit message
Last commit date

parent directory

..
 
 
 
 

Balanced Binary Tree

Implement a function that returns whether a given binary tree is balanced or not.

An empty tree is considered height-balanced. A non-empty binary tree T is balanced if and only if T's left and right subtrees are both balanced, and the heights of T's left and right subtrees do not differ by more than 1.

[Solution]