a breadth first search should use a distinct queue