BNY Interview Question

Asked to write code for Balanced binary tree