Hello,Does anyone have any interesting, mind-blowing cases for Problem D? I seem to miss one or two. Thanks for the help in advance
Same situation here. Did you manage @bercin to find any test case to fix it?
Thanks in advance.
Same for me..Any interesting test case would help.
If you construct a new graph, be sure to create new cities for Lea and Peter. That was at least one of my faults.
Hey guys,I'd appreciate if any of you could give me your output of these test cases:33 2 1 1 21 2 21 3 12 2
3 2 1 1 21 2 12 3 23 2
3 2 2 1 21 2 12 3 11 53 1
Case #1: 0:04Case #2: 0:07Case #3: 0:04
Thanks @spahl. Cheers.
I seem to not have the most efficient solution, with finding the shortest paths from every supermarket and then comparing these and finding the best one. Can anybody give me a hint to what might be a faster approach? Would really appreciate it
Find the shortest paths from start and destination then add both for every supermarket and find the minimum. This way you only use dijkstra twice not number of supermarket many times
Ah!... Thank you very much!
Thanks a Lot. I was stuck over here only.
Anyone had a Timelimit error in this exercise? I am finding shortest paths twice as @spahl suggested but still get a Timelimit error.
@hacioglb The shortest path algorithm you are using might be too slow. Are you using the algorithms as described in the lecture (Dijkstra with priority queues or BF with queues)?
3 times dijkstra worked for me ;3
Here is a test case that helped me to figure out the solution: 1 4 4 1 1 3 1 2 1 2 3 1 1 4 1 4 3 2 4 1
I am using Dijkstra with LinkedList. I should probably try with PQ. Thanks!