New answers tagged

1

This is not the right place to ask for people to review your code, but it's perfectly normal for Dijkstra's algorithm and Uniform Cost Search (BFS) to return different paths. Indeed, a shortest path on a weighted graph is not necessarily the one that uses less edges. As an example you can consider the graph $G=(V,E)$ with $V=\{s,u,v\}$, $E=\{(s,u), (u,v), (s,...


Top 50 recent answers are included