Course Registration
CodeChefOpen on judge ↗
Student A and his friends have to complete ‘N’ courses in order to complete their UG programme. The courses are numbered from 1, 2, 3, …, N. There are ‘M’ requirements for each test case. The requirements are in the form of course C1 is a prerequisite for course C2. Find an order for each test case in which student A and his friends can complete all the courses. Input The first line of input co
HINT LADDERno hints yet
L1 Observation
L2 Technique
L3 Approach
L4 Pseudo-code
🔒
L5 Full solution
L5 unlocks only if you insist twice
solution.cppC++17
CodeSearch Tutor
Hints, not spoilers — it won’t hand over the full solution unless you insist.
Sign in to chat with the tutor and save your progress.
Sign in to start