This preview has intentionally blurred sections. Sign up to view the full version.View Full Document
Unformatted text preview: Begin While G has a non-visited node v do. Visited (v) =1 ; Add queue (Q,v) ; While Q ≠ ∅ do. X = remove queue (Q) ; For every adjacent node w of X do. If visited (w)=o Then visited (w)=1 ; add queue (Q,w) ; Endif End for End while End while End. Complexity: O(max(n,e))...
View Full Document
This document was uploaded on 09/03/2010.
- Fall '09