-
Notifications
You must be signed in to change notification settings - Fork 372
lab3 #1576
New issue
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
base: master
Are you sure you want to change the base?
lab3 #1576
Conversation
Lab3CPP/lab3.cpp
Outdated
|
|
||
| typedef vector<vector<int>> Graph; | ||
|
|
||
| vector<int> bfs(const Graph& graph, int start) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Для возвращаемого значения нужен typedef.
Lab3CPP/lab3.cpp
Outdated
| vector<int> bfs(const Graph& graph, int start) { | ||
| int n = graph.size(); | ||
| vector<int> distances(n, -1); | ||
| vector<bool> visited(n, false); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Без этого массива можно обойтись.
LibraryCPP/list.h
Outdated
| ListItem* next; | ||
| ListItem* prev; | ||
| Data data; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Эти структуры должны быть в cpp.
LibraryCPP/queue.h
Outdated
| struct Queue; | ||
| struct Queue { | ||
| List* list; | ||
| }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Структура должна быть определена в cpp.
No description provided.