IBM interview question

Course Schedule which is based on tree.