Skip to content

07 그래프 #33

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

Merged
merged 14 commits into from
Mar 25, 2025
Merged

07 그래프 #33

merged 14 commits into from
Mar 25, 2025

Conversation

kimyeheun
Copy link
Contributor

그래프 탐색 문제 풀이 시 주의 사항

❗idea

  • 특정 지점까지의 최단거리? → bfs를 먼저 떠올려보자
  • 특정 지점까지 가는 경로의 수와 같이 특정 지점까지 가는 방법론 관련 문제 → dfs를 떠올려보자!

💡코드 작성 전에

  • 각 노드간 연결 경로를 어떻게 저장할 것인지 생각해보기
    • 인접 행렬, 인접 리스트, 간선 리스트 …
  • bfs와 dfs를 구현하는 여러 방법을 생각해보기 (재귀, stack, queue 등

팀 프로젝트

  • 어려웠던 점
    • 시간 초과를 해결하는 것이 관건이었다.
  • 풀이 방식
    • 재귀를 이용한 dfs 방식을 사용하되, visited 배열과 finished 배열을 따로 두어 불필요한 탐색을 막고자 하였습니다.

@kimyeheun kimyeheun merged commit 4669982 into SSAFY-Coding-Test:07-kim Mar 25, 2025
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