Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我陷入了以下问题:
我有一个子图的邻接列表,它是完整图的一部分。我想要做的是将 bfs 算法应用于给定子图的补码。所以,要做到这一点,我需要补码中每个顶点的后继。
最有效的方法是什么?该图有大量的顶点和边(~1 000 000)。