Back to course home
0% completed
Balanced Binary Tree (easy)
Problem Statement
Determine if a binary tree is height-balanced.
A binary tree is considered height-balanced if, for each node, the difference in height between its left and right subtrees is no more than one.
Examples:
- Input:
3
/ \
9 20
/ \
15 7
- Expected Output: true
- Justification: Every node in the tree has a left and right subtree depth difference of either 0 or 1.
- Input:
1
/ \
2 2
/ \ / \
3 3 3 3
/ \ / \
4 4 4 4
- Expected Output: true
.....
.....
.....
Like the course? Get enrolled and start learning!
Table of Contents
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible
Contents are not accessible