Cracking The Coding Interview/Q 4.1

From Software Engineers Wiki
Jump to: navigation, search

Implement a function to check if a binary tree is balanced. For the purposes of this question, a balanced tree is defined to be a tree such that the heights of the two subtrees of any node never differ by more than one.

Answer

Please refer to Check if a binary tree is balanced page.

Personal tools
Namespaces

Variants
Actions
Navigation
Toolbox