Try to keep your response to a couple of sentences.
Pick an order to approach the problem.
There is more than one viable option.
Are there any unviable options? Why are they unviable?
What is the first choice to be made in your order?
Is there a greedy heuristic by which to make your choice, i.e. an apparently best option?
Prove that your greedy heuristic is correct, by an exchange argument: suppose otherwise, make a swap that brings it in line with your heuristic, and show that the effect of this swap is neutral or positive.
How will we determine whether we have failed to prepare adequately for an exam?
Design an algorithm which determines whether Petya can pass all the exams, and if so, finds a satisfactory schedule.
Analyse the time complexity of your algorithm.
Estimate the running time of an implementation of your algorithm.
Implement this algorithm in code.
Reflector:
What potential pitfalls can you think of?
Devise some challenging test cases, and explain why they are challenging.