Skip to content

Conversation

@SRASONY
Copy link
Contributor

@SRASONY SRASONY commented Apr 21, 2025

[Baekjoon-2606] 바이러스

이 문제는 따로 풀어봤던 문제라 다시 한번 복습해 볼 수 있는 좋은 기회였습니다!

  • 양방향 그래프 탐색 문제로 해석 가능.
  • 그래프는 computers[i] = [연결된 컴퓨터 목록] 형태로 인접 리스트 구성.
  • BFS로 1번 노드부터 탐색 시작.
  • 이미 방문한 노드는 다시 방문하지 않도록 visited 배열 사용.
  • 방문할 때마다 카운트 증가 (cnt += 1)

Copy link
Contributor

@cjh-19 cjh-19 left a comment

Choose a reason for hiding this comment

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

저는 큐를 사용해서 풀었었는데 데큐를 사용해서 푼 점이 재밌는 것 같습니다! 고생하셨습니다!

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