OneDirect (India) interview question

Tree, sets, two sum problem