Question 1
Download the text file
here. Zipped version
here. (Right click and save link as)
The file contains the edges of a directed graph. Vertices are labeled as positive integers from 1 to 875714. Every row indicates an edge, the vertex label in first column is the tail and the vertex label in second column is the head (recall the graph is directed, and the edges are directed from the first column vertex to the second column vertex). So for example, the

本博客主要介绍了斯坦福大学公开课中关于算法设计与分析的一个编程问题,任务是针对一个含有875714个节点的有向图,实现算法以计算其最大的5个强连通分量(SCCs)的大小。输出格式要求按降序列出这些大小,如果少于5个,则剩余部分用0填充。由于图的规模,挑战在于内存管理,建议在讨论论坛交流解决策略。该问题涉及到广度优先搜索(BFS)和深度优先搜索(DFS)的实现。
最低0.47元/天 解锁文章

被折叠的 条评论
为什么被折叠?



