110. Balanced Binary Tree

Practice Balanced Binary Tree for free on NudgeCode: Easy, Binary Tree pattern. Write it in Python or JavaScript, run the tests in your browser, and ask for a hint when you are stuck.

A binary tree is height-balanced when, at every node, the heights of the left and right subtrees differ by at most 1. Return whether the given tree is height-balanced. An empty tree is balanced.

Example

root = [1,2,2,3,3,null,null,4,4]  ->  false

Constraints