ABBYY Interview Question

Check if the binary tree is balanced