New answers tagged

0 votes

Coding the labyrinth solver

Step 1. Firstly, adjacency list is preferable, since the graph is very sparse. Even if you don't care about memory and running time, using list is more convenient in this specific problem, since you ...
Smylic's user avatar
  • 176
0 votes

Dijkstra's shortest path algorithm without relaxation

Yes, Dijkstra's algorithm without relaxation is possible. But the big-O complexity is the same. Dijkstra uses greedy strategy so there is the priority_queue that guarantees the popped vertex is the ...
loohooloo's user avatar

Top 50 recent answers are included