Hi all, I recently learnt how to implement breadthfirstsearch (BFS) using C++ STL vector. However, though I know the algorithm of depthfirstsearch (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 FloydWarshall's algorithm) can be derived from BFS and DFS. Thanks in advance! asked 21 Jan '15, 23:08

Read it here: http://community.topcoder.com/tc?module=Static&d1=tutorials&d2=standardTemplateLibrary2 answered 22 Jan '15, 14:14

plz make ur query a bit more clear