12.07.2015 Views

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

A Practical Introduction to Data Structures and Algorithm Analysis

SHOW MORE
SHOW LESS
  • No tags were found...

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Sec. 11.3 Graph Traversals 403ACall DFS on ACAMark AProcess (A, C)Print (A, C) <strong>and</strong>call DFS on CBCAMark CProcess (C, A)Process (C, B)Print (C, B) <strong>and</strong>call DFS on CDFBCAMark BProcess (B, C)Process (B, F)Print (B, F) <strong>and</strong>call DFS on FFBCAMark FProcess (F, B)Process (F, C)Process (F, D)Print (F, D) <strong>and</strong>call DFS on DFBCAMark DProcess (D, C)Process (D, F)Pop DEFFBCAProcess (F, E)Print (F, E) <strong>and</strong>call DFS on EBCAMark EProcess (E, A)Process (E, F)Pop EBCADone with FPop FCADone with BPop BAContinue with CProcess (C, E)Process (C, F)Pop CContinue with AProcess (A, E)Pop ADFS completeFigure 11.9 A detailed illustration of the DFS process for the graph of Figure11.8(a) starting at Vertex A. The steps leading <strong>to</strong> each change in the recursionstack are described.

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!