g++ -std=c++11 -Wall CarlosLuisPathfinder.cpp
./a.out
Compiles and runs with Microsoft Visual Studio with C++ support.
/********************* Working Algorithms **********************/
/*********************** DFS ***********************/
/* pf.findPathNonRecursive1(g, sm); */
/********************* BFS **********************/
/* pf.findPathNonRecursive2(g, qm); */
/*************** Dijkstra's Algorithm *****************/
/* pf.findShortestPath1(g, sm); */
/************ Recursive: Uncomment the following 2 lines **********/
/* sm.push(0); */
/* pf.findPathRecursive(g, sm); */
Map File | Recursive | NonRec1 | NonRec2 | ShortestPath1 | ShortestPath2 |
---|---|---|---|---|---|
map1 | ✅ | ✅ | ✅ | ✅ | Not implemented |
map2 | ✅ | ❌ | ✅ | ❌ | Not implemented |
map3 | ✅ | ❌ | ✅ | ❌ | Not implemented |
Initially I fixed and used the d_graph header file but decided to reimplement everything with the newer supplied file.
DFS fails when it needs to move left in some cases.
Due to my Dijkstra's algorithm being a DFS implementation, it inherits this error.