Skip to content

Commit 118c141

Browse files
authored
Update number-of-ways-to-reconstruct-a-tree.cpp
1 parent dc5939b commit 118c141

File tree

1 file changed

+1
-2
lines changed

1 file changed

+1
-2
lines changed

C++/number-of-ways-to-reconstruct-a-tree.cpp

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,6 @@ class Solution {
1919
[&adj](const auto& a, const auto& b) {
2020
return size(adj[a]) > size(adj[b]);
2121
});
22-
int result = 1;
2322
for (const auto& node : nodes) {
2423
lookup.emplace(node);
2524
int parent = 0;
@@ -42,6 +41,6 @@ class Solution {
4241
return 0;
4342
}
4443
}
45-
return result + mul;
44+
return 1 + mul;
4645
}
4746
};

0 commit comments

Comments
 (0)