Cadence Design Systems interview question

Check if binary tree is balanced or not