We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
for (int i = 1; i <= n; i++) { if (visited[i] == false) { cout << -1 << endl; return 0; } } cout << 1 << endl; BFS和DFS都是这样的,是否加上return 0;更安全一点?
for (int i = 1; i <= n; i++) {
if (visited[i] == false) {
cout << -1 << endl;
return 0;
}
cout << 1 << endl;
The text was updated successfully, but these errors were encountered:
代码随想录-冗余连接-思路 第二行“这里我依然降调一下...”,是不是“强调”?
Sorry, something went wrong.
No branches or pull requests
for (int i = 1; i <= n; i++) {
if (visited[i] == false) {
cout << -1 << endl;
return 0;
}
}
cout << 1 << endl;
BFS和DFS都是这样的,是否加上return 0;更安全一点?
The text was updated successfully, but these errors were encountered: