Can this breadth-first search be made faster?

后端 未结 4 2094
野的像风
野的像风 2021-02-09 23:28

I have a data set which is a large unweighted cyclic graph The cycles occur in loops of about 5-6 paths. It consists of about 8000 nodes and each node has from 1-6 (usually abou

4条回答
  •  心在旅途
    2021-02-09 23:34

    Hmm, doesn't BFS involve marking nodes you've already seen so you don't visit them again?

提交回复
热议问题