Merged
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
#️⃣ 어떤 브랜치인가요?
BFS 구현하기
기본부터 돌아가는 마음으로 기본적인 BFS 에 대한 구현을 진행했습니다.
BFS의 핵심은
현재 위치를 처리한 뒤, 그 주변 노드들을 먼저 탐색하도록 관리하는 것입니다.
즉, 깊게 들어가기보다는 너비 방향으로 확장해 나가는 방식으로
주변 애들부터 탐색을 해야하기에 다음에 처리할 일을 저장해둘 저장 공간이 필요해 선입 선출이 가능한 Queue를 사용하는 것이 핵심.
크게 핵심으로는
이런 특징으로 구현을 하게 됩니다.
4가지로 이루어져 있습니다.