mirror of
https://github.com/krahets/hello-algo.git
synced 2026-09-01 04:47:12 +00:00
Bug fixes and improvements (#1813)
* Sync zh and zh-hant version. * Add the Warp sponsor banner. * Update README with acknowledgments and Warp recommendation Added acknowledgments and a recommendation for the Warp terminal application. * Update README.md * Update links in README.md to use HTTPS * Sync zh and zh-hant versions. * Add special thanks for Warp spnsorship. * Use official warp image link.
This commit is contained in:
@@ -45,7 +45,7 @@ impl GraphAdjMat {
|
||||
// 在鄰接矩陣中新增一行
|
||||
self.adj_mat.push(vec![0; n]);
|
||||
// 在鄰接矩陣中新增一列
|
||||
for row in &mut self.adj_mat {
|
||||
for row in self.adj_mat.iter_mut() {
|
||||
row.push(0);
|
||||
}
|
||||
}
|
||||
@@ -60,7 +60,7 @@ impl GraphAdjMat {
|
||||
// 在鄰接矩陣中刪除索引 index 的行
|
||||
self.adj_mat.remove(index);
|
||||
// 在鄰接矩陣中刪除索引 index 的列
|
||||
for row in &mut self.adj_mat {
|
||||
for row in self.adj_mat.iter_mut() {
|
||||
row.remove(index);
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user