BNY interview question

Asked to write code for Balanced binary tree