I recently learnt how to implement breadth-first-search (BFS) using C++ STL vector. However, though I know the algorithm of depth-first-search (DFS) but cannot understand how to implement it using C++ STL. Please provide me a code using C++ STL to implement it.
Also kindly tell me how the shortest path algorithms (such as Dijkstra’s algorithm or Floyd-Warshall’s algorithm) can be derived from BFS and DFS.
Thanks in advance!