Hi Dhruva, Thanks for your input. The cHeap and jHeap are considering the values which were already assigned to C and J, hence their start time is already sorted. Since, the intervals are processed according to start time. Hence, the cHeap and jHeap are assigning the latest task itself, since that latest task will have the largest end time (as start time is sorted). hence, I agree that cHeap and jHeap are overkill and only the latest value is sufficient.
The issue with the code was that the iterator was not printing the final output in the right order as porker2008 pointed out. Regards, Manasa -- You received this message because you are subscribed to the Google Groups "Google Code Jam" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/google-code/417cef6c-852c-4a53-8cc2-d0b31ab9ac26%40googlegroups.com.
