noobyy
noobyy

Reputation: 143

What path finding algorithm is the best one for my sitatuion?

Lets say I have 2000 nodes, and out of those 2000, 100 of them are acceptable paths to take, but I want to take the shortest path of the 100 nodes, which algorithm is the best for this and why?

(Also I haven't really dove into path finding that much so I don't know much terminology yet.)

Upvotes: 0

Views: 44

Answers (1)

nwatx
nwatx

Reputation: 118

What do you mean by 100 of them are acceptable paths? If it gives you the paths already, and since 100 is a fairly small number, I would perform complete search towards the given paths. If you mean ignoring either nodes/edges, then choose Dijkstra's Algorithm in order to find your path in $\mathcal{O}(V + E\log V)$.

Upvotes: 1

Related Questions