ImpactQA interview question

Binary trees, oops and sorting