package
0.0.0-20230710210237-5ce2504b62fa
Repository: https://github.com/shomali11/go-interview.git
Documentation: pkg.go.dev

# README

Description

Check if a multi tree is balanced. A balanced tree is a tree where every leaf is “not more than a certain distance” away from the root than any other leaf.

Example 1:

Input:

  4
  |
  2    
  |  
  1    

Output:
true

Example 2:

Input:

       4
     /   \
    2     5
    |  
    1
 /  |  \
3   2   6

Output:
false

# Functions

IsBalanced checks if a multi tree is balanced.