See DFS tutorial. Actually, you can't speed up DFS to find concrete vertex in the worst-case. Just, when DFS hits the vertex you are looking for, backtrack without visiting other vertices.
CodeGuru Home | VC++ / MFC / C++ | .NET / C# | Visual Basic | VB Forums | Developer.com |
Search:Type: Posts; User: master78 Search: Search took 0.03 seconds.
Results 1 to 3 of 3
|
Click Here to Expand Forum to Full Width |