*for (Interval itm : oFinal) {*
*    System.out.print(itm.person);*
*}*

The iterator from PriorityQueue does not return the elements in a 
particular order 
<https://docs.oracle.com/javase/7/docs/api/java/util/PriorityQueue.html#iterator()>,
 
that's why your solution does not work.

Instead you can try the following replacement.

*while (!oFinal.isEmpty()) {*
*    Interval temp = oFinal.remove();*
*    System.out.print(temp.person);*
*}*

-- 
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 google-code+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/google-code/60fec719-e6ee-4ceb-88c0-6974f9507879%40googlegroups.com.

Reply via email to