Tree height finder and balance tree Check(LeetCode)