Complete graph with only two possible costs. What’s the shortest path’s cost from 0 to N – 1
This is laborous case work: A < B and 0 and N-1 are joined by A -> trivial. B < A and 0 and N-1 are joined by B -> trivial. B < A and 0 and N-1 are joined by A -> Do BFS on graph with only K edges. A < B and … Read more