Sort 425 Discussions, By:
Please Login in order to post a comment
Please make sure you guys are accounting for duplicate edges... don't make my mistake.
Guys, after each test case print a new line
I keep timing out on Test Case #7. In Java I'm using an arraylist of hashmaps to keep track of the edge weights, and a priority queue of neighbor vertices to select which to visit next.
Any general advice how to get it to perform faster? Let me know if I should just post the code.
Don't forget to print -1 for unreachable nodes instead of some max value.
Test case #7 times out. It seems like noone in the recent past has suffered from the same anomaly. Posting to say that if a similar thing is happening to your implementation, you are not alone. :)