Differences
This shows you the differences between two versions of the page.
Both sides previous revisionPrevious revision | |||
courses:cs211:winter2012:journals:jeanpaul:chapterthreesectioniii [2012/01/31 02:44] – mugabej | courses:cs211:winter2012:journals:jeanpaul:chapterthreesectioniii [2012/01/31 02:48] (current) – mugabej | ||
---|---|---|---|
Line 70: | Line 70: | ||
end while | end while | ||
+ | This implementation of the DFS takes O(m+n) if the graph is given by the adjacency list representation.\\ | ||
+ | Thus when using a DFS or a BFS, one can easily implement graph traversals in linear time(O(m+n)).\\ | ||
+ | This section was interesting too, I give it an 8/10. |