dsa1 min read
Balanced Binary Tree — Height DFS with Early Exit
Check if a binary tree is height-balanced by computing subtree heights and returning -1 early on imbalance.
Read →
1 articles
Check if a binary tree is height-balanced by computing subtree heights and returning -1 early on imbalance.