摘要: 图可以看作一般化的树 建图(图的存储结构) 以存点方式存储图 邻接矩阵(适用于稠密图) vector<vector<int>>v(MAX,vector<int>(MAX,0)); 邻接表 unordered_map<int,vector<int>> head; 以存边方式存储图 链式前向星(静态链表 阅读全文
posted @ 2024-05-08 20:14 椰萝Yerosius 阅读(25) 评论(0) 推荐(0)