20.11.2013 Views

Föreläsning Datastrukturer (DAT036)

Föreläsning Datastrukturer (DAT036)

Föreläsning Datastrukturer (DAT036)

SHOW MORE
SHOW LESS

Create successful ePaper yourself

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

dfs (scc, v) {<br />

visited[v] = true<br />

scc.add-last(v)<br />

}<br />

for w ∈ {w | (v, w) ∈ E} do<br />

if not visited[w] then<br />

dfs (scc, w)

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

Saved successfully!

Ooh no, something went wrong!