Samsung Research America Interview Question

AVL balance tree question was asked to be coded during the written test