Standard BFS Loop
while queue : NEW_LINE INDENT u = queue . pop ( 0 ) NEW_LINE for ind , val in enumerate ( self . graph [ u ] ) : NEW_LINE INDENT if visited [ ind ] == False and val > 0 : NEW_LINE DEDENT DEDENT