Infosys interview question

Tree based questions were asked.