Problem
Submissions

Problem: Balanced Binary Tree

Statement

Given a binary tree with nn nodes, return TRUE if it is height-balancedA binary tree is considered height-balanced if the difference between the heights of the two subtrees for each node is not more than 1.. Otherwise, return FALSE.

Note: The height of an empty tree is 00.

Constraints:

  • 1≤n≤5001 \leq n \leq 500
  • −104≤-10^4 \leq Node.data ≤104\leq 10^4
Problem
Submissions

Problem: Balanced Binary Tree

Statement

Given a binary tree with nn nodes, return TRUE if it is height-balancedA binary tree is considered height-balanced if the difference between the heights of the two subtrees for each node is not more than 1.. Otherwise, return FALSE.

Note: The height of an empty tree is 00.

Constraints:

  • 1≤n≤5001 \leq n \leq 500
  • −104≤-10^4 \leq Node.data ≤104\leq 10^4