This commit is contained in:
krahets
2023-03-15 03:12:57 +08:00
parent 000a583f92
commit 683e7ee872
7 changed files with 138 additions and 130 deletions

View File

@@ -952,7 +952,9 @@ comments: true
/* 打印邻接表 */
void print() {
cout << "邻接表 =" << endl;
for (auto& [key, vec] : adjList) {
for (auto& adj : adjList) {
const auto& key= adj.first;
const auto& vec = adj.second;
cout << key->val << ": ";
PrintUtil::printVector(vetsToVals(vec));
}