There is a university with certain sets of courses. You can take a course in any semester but you need to finish its prereq course (if prereq is given for a course) before that. Design the whole university structure and suggest the Algo. He then changed the question bit, if you can take up a course and its pre req in the same semester how will your code change. Topological sort
It was not a coding question only. He expected me to write a Heap interface and using that implement min heap or max heap. And also write the heapify code