Skip to content
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

08 DFS BFS #9

Open
wants to merge 17 commits into
base: main
Choose a base branch
from
Open

08 DFS BFS #9

wants to merge 17 commits into from

Conversation

hvvijung
Copy link
Collaborator

@hvvijung hvvijung commented Apr 9, 2024

인적사항

학번: 2371097
이름: 조휘정

과제제출

기존제출: 2606, 2644
추가제출:

Copy link

@aeyongdodam aeyongdodam left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

2606(P3), 2644(P3)
안녕하세요 휘정님! 코드 리뷰 완료되었습니다👍
bfs를 활용한 풀이 너무 좋습니다. 다만 주석이 있다면 더더욱 좋을 것 같습니다.
늘 성실하게 과제 제출해주셔서 감사합니다.
이번주도 고생하셨습니다! 시험 기간 화이팅입니다~!
몇 가지 사소한 코멘트 남겼습니다.
궁금하신 점이 있다면 리뷰어를 호출해주세요!

Comment on lines +17 to +28
while (!q.empty()) {
int current = q.front();
q.pop();

for (int t : adj[current]) {
if (!visited[t]) {
q.push(t);
visited[t] = true;
cnt++;
}
}
}

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: bfs를 활용한 풀이 너무 좋습니다!
다만 주석이 있으면 더더욱 좋을 것 같습니다 👍


int result = count(1);

cout << result << "\n";

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: 입출력 메인에서 해주는 습관 너무 좋은 것 같습니다

vector<vector<int>> v;
int dist[MAX];

void bfs(int start) {

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

P3: bfs로 촌수 관계 계산을 잘 해주셨네요

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants