Algorithm Guidecomplexity: O(V+E)
너비 우선 탐색 (BFS)
Queue(FIFO)를 사용해 가까운 노드부터 층층이(level-order) 확장하는 그래프 탐색 알고리즘입니다. 무가중치 그래프에서 최단 경로를 보장하며, 최단 거리·컴포넌트 탐지·위상 정렬의 기반이 됩니다.
01 Explore How It Works
Interactive Step-by-StepHOVER OR SCROLL
Breadth-First Search
BFS 시작. 큐(FIFO)로 가까운 노드부터 층층이 확장해 목표 G까지의 최단 경로를 찾습니다.
Logic Node1 / 9
Live Python
02 Understand It Simply
For Everyone🔑Analogy
잔잔한 물에 돌을 던졌을 때 동심원이 퍼지듯, 가까운 곳부터 훑는 것.
💡In Plain Words
큐로 가까운 노드부터 층층이 방문합니다.
가중치 없는 그래프에서 최단 경로를 보장해요.
📍Where It's Used
- –최단 경로(무가중치)
- –친구 추천
- –미로 최단거리
03 Python Implementation
A clean, readable reference implementation of the core logic of 너비 우선 탐색 (BFS).
core_implementation.py
04 Frequently Asked Questions
FAQWhat is 너비 우선 탐색 (BFS)?+
Queue(FIFO)를 사용해 가까운 노드부터 층층이(level-order) 확장하는 그래프 탐색 알고리즘입니다. 무가중치 그래프에서 최단 경로를 보장하며, 최단 거리·컴포넌트 탐지·위상 정렬의 기반이 됩니다.
What is the time complexity of 너비 우선 탐색 (BFS)?+
The time complexity of 너비 우선 탐색 (BFS) is O(V+E). Follow the step-by-step visualization to see exactly why.
Where is 너비 우선 탐색 (BFS) used?+
최단 경로(무가중치), 친구 추천, 미로 최단거리.
What's a simple analogy for 너비 우선 탐색 (BFS)?+
잔잔한 물에 돌을 던졌을 때 동심원이 퍼지듯, 가까운 곳부터 훑는 것.
→ Searching — see allRelated
Guide Progress0%
