Utility bfs method to fill distance vector and returns most distant marked node from node u
def bfsWithDistance ( g , mark , u , dis ) : NEW_LINE INDENT lastMarked = 0 NEW_LINE q = queue . Queue ( ) NEW_LINE DEDENT