Skip to content

[Baekjoon-2606] yein#165

Open
2076070 wants to merge 1 commit intomainfrom
yein/2606
Open

[Baekjoon-2606] yein#165
2076070 wants to merge 1 commit intomainfrom
yein/2606

Conversation

@2076070
Copy link
Contributor

@2076070 2076070 commented May 6, 2025

저번주에 홀라당 도망간 날...
넘 쉬운 거 골랐으려나여.....
상어는 아직도 못 풀었습니다 ㅠ

DFS로 풀었습니다!

  • 양방향 그래프라는 것을 미처 생각하지 못해서 처음에 오류가 났었는데... 원인을 알고 난 뒤에는 쉽게 해결할 수 있었습니다.
  • 감염된 컴퓨터 수를 셀 때 1번 컴퓨터는 제외하고 세었어야 했습니다. 다른 방법도 있었겠지만... 셀 때 1번이면 정답 수에서 제외했습니다.
  • global 예약어 대신 리턴값 같은 걸 사용했으면 어땠을까 싶기도 하고...

__

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.

1 participant