Arista Networks interview question

Check whether a given BST is balanced.