2013年8月18日

coursera review---algorithms,Stanford---04---BFS & DFS

摘要: 1 #include 2 #include 3 #include 4 #include 5 6 using namespace std; 7 8 typedef map > graphType; 9 10 void BFS(graphType graph, int starter, map & visitTime) {11 queue Q;12 Q.push(starter);13 map visited;14 for (auto i : graph) {15 visited[i.first] = false;16 }17 ... 阅读全文

posted @ 2013-08-18 10:19 haoyancoder 阅读(178) 评论(0) 推荐(0)

导航