remove auto
This commit is contained in:
@@ -25,8 +25,10 @@ void preorder(Node* root, std::vector<int>& result){
|
|||||||
}
|
}
|
||||||
result.push_back(root->val);
|
result.push_back(root->val);
|
||||||
|
|
||||||
for(auto child : root->children){
|
// general case
|
||||||
preorder(child, result);
|
int size = (root->children).size();
|
||||||
|
for(int i=0; i<size; ++i){
|
||||||
|
preorder(root->children[i], result);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user