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

[DFS_BFS] 4월 9일 #8

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

[DFS_BFS] 4월 9일 #8

wants to merge 2 commits into from

Conversation

Jiwoon-Yoon
Copy link
Collaborator

@Jiwoon-Yoon Jiwoon-Yoon commented Apr 9, 2024

인적사항

학번: 2276209
이름: 윤지운

과제제출

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

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 +13 to +29
void bfs(int index) {
queue<int>q;
q.push(index);
visited_bfs[index] = true;

while (!q.empty()) {
int current_v = q.front();
q.pop();

for (int i = 1; i <= n; i++) {
if (li[current_v][i] == 1 && !visited_bfs[i]) {
visited_bfs[i] = true;
q.push(i);
}
}
}
}

Choose a reason for hiding this comment

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

P3: bfs를 이용하여 문제 풀이 잘해주셨네요!
주석이 있다면 더더욱 좋을 것 같습니다ㅎㅎ

}
}

cout << cnt - 1;

Choose a reason for hiding this comment

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

P3: 입출력 모두 메인에서 관리하는 것 너무 좋습니다 👍

Comment on lines +11 to +26
void bfs(int index,int n) {
queue<int>q;
q.push(index);

while (!q.empty()) {
int current_v = q.front();
q.pop();

for (int i = 1; i <= n; i++) {
if (li[current_v][i] != 0 && visited_bfs[i] == 0) {
visited_bfs[i] = visited_bfs[current_v] + 1;
q.push(i);
}
}
}
}

Choose a reason for hiding this comment

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

P3: 두 문제 모두 bfs를 이용하여 문제 풀이 잘 해주셨네요~! 최고입니다

Comment on lines +29 to +30
ios::sync_with_stdio(false);
cin.tie(NULL); cout.tie(NULL);

Choose a reason for hiding this comment

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

P3: 입출력 시간 관리 너무 좋습니다 👍

Copy link

@chaeri93 chaeri93 left a comment

Choose a reason for hiding this comment

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

[DFS/BFS 구현 코드 리뷰 완료]
2615
안녕하세요 지운님!
추가제출 확인 완료되었습니다👍 수고하셨습니다!

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.

3 participants