code: func (s *joinReorderDPSolver) bfsGraph(startNode int, visited []bool, adjacents [][]int, nodeID2VistID []int) []int {
  	queue := []int{startNode}
  	visited[startNode] = true
  	var visitID2NodeID []int
  	for len(queue) > 0 {
  		curNodeID := queue[0]
  		queue = queue[1:]
  		nodeID2VistID[curNodeID] = len(visitID2NodeID)
  		visitID2NodeID = append(visitID2NodeID, curNodeID)
  		for _, adjNodeID := range adjacents[curNodeID] {
  			if visited[adjNodeID] {
  				continue
  			}
  			queue = append(queue, adjNodeID)
  			visited[adjNodeID] = true
  		}
  	}
  	return visitID2NodeID
  }
docs: // bfsGraph bfs a sub graph starting at startPos. And relabel its label for future use.