mirror of
https://github.com/krahets/hello-algo.git
synced 2025-12-16 03:59:18 +08:00
Add the section of hash algorithm. Refactor the section of hash map. (#555)
This commit is contained in:
@@ -36,7 +36,7 @@ class GraphAdjMat {
|
||||
// 向顶点列表中添加新顶点的值
|
||||
vertices.push_back(val);
|
||||
// 在邻接矩阵中添加一行
|
||||
adjMat.emplace_back(n, 0);
|
||||
adjMat.emplace_back(vector<int>(n, 0));
|
||||
// 在邻接矩阵中添加一列
|
||||
for (vector<int> &row : adjMat) {
|
||||
row.push_back(0);
|
||||
|
||||
Reference in New Issue
Block a user