Building a undirected graph
def buildGraph ( x , y , llen ) : NEW_LINE INDENT for i in range ( llen ) : NEW_LINE INDENT p = x [ i ] NEW_LINE q = y [ i ] NEW_LINE Graph [ p ] . append ( q ) NEW_LINE Graph [ q ] . append ( p ) NEW_LINE DEDENT DEDENT