time
to keep track of the current time.time
.
b. If the current course cannot be taken directly, check the maximum duration in the priority queue.
c. If the maximum duration is greater than the current course's duration, replace it with the current course, adjust time
, and update the priority queue.