DataStructure
Breadth-First Search(BFS)
Breadth-First Search 너비 우선 탐색: 신중하게 주변을 살피고 나아가는 traversal 자기 자신의 neighbors들을 모두 살피며 탐색함 알고리즘 BFS(G, v): Q.enqueue(v); mark v as "visited"; while(Q is not empty){ v A Q: [ A ] -> [ ] B is A's neighbors and "Unvisited" Q: [ B ] mark B as "visited" C is A's neighbors, and "Unvisited" Q: [ B, C ] mark C as "visited" D is A's neighbors, and "Unvisited" Q: [ B, C, D ] mark D as "visited" ..
2021. 1. 20. 01:12
최근댓글