breadth first search (bfs)

PPTX 45 стр. 303,9 КБ Бесплатная загрузка

Предварительный просмотр (5 стр.)

Прокрутите вниз 👇
1 / 45
breadth first search (bfs) breadth first search (bfs) algorithms and data structures course breadth first search (bfs) bfs is also a method to traverse graph. algorithm: algorithms and data structures course bfs(v) { add v to queue q while q is not empty take front vertex u from q remove front vertex of q mark u as visited for all unvisited adjacent vertices w of u add w to the q } breadth first search (bfs) algorithms and data structures course visited vertices: {} queue: {} current vertex: - legend: green vertices is unvisited gray vertices is queued black vertices is visited orange vertex is a current vertex blue arrows is a path we go red arrows is a direction we can’t go 1 2 4 6 7 8 5 3 breadth first search (bfs) algorithms and data structures course visited vertices: {} queue: {1} current vertex: - legend: green …
2 / 45
algorithms and data structures course visited vertices: {1} queue: {2, 4} current vertex: 1 1 2 4 6 7 8 5 3 legend: green vertices is unvisited gray vertices is queued black vertices is visited orange vertex is a current vertex blue arrows is a path we go red arrows is a direction we can’t go breadth first search (bfs) algorithms and data structures course visited vertices: {1} queue: {2, 4} current vertex: - 1 2 4 6 7 8 5 3 legend: green vertices is unvisited gray vertices is queued black vertices is visited orange vertex is a current vertex blue arrows is a path we go red arrows is a direction we can’t go breadth first search (bfs) algorithms and data structures course visited vertices: {1, 2} queue: {4} current vertex: 2 1 2 4 6 7 8 5 3 legend: green vertices is unvisited gray vertices is …
3 / 45
queue: {4, 6, 7} current vertex: - 1 2 4 6 7 8 5 3 legend: green vertices is unvisited gray vertices is queued black vertices is visited orange vertex is a current vertex blue arrows is a path we go red arrows is a direction we can’t go breadth first search (bfs) algorithms and data structures course visited vertices: {1, 2, 4} queue: {6, 7} current vertex: 4 1 2 4 6 7 8 5 3 legend: green vertices is unvisited gray vertices is queued black vertices is visited orange vertex is a current vertex blue arrows is a path we go red arrows is a direction we can’t go breadth first search (bfs) algorithms and data structures course visited vertices: {1, 2, 4} queue: {6, 7} current vertex: 4 1 2 4 6 7 8 5 3 legend: green vertices is unvisited gray vertices is queued black vertices …
4 / 45
vertex: 6 1 2 4 6 7 8 5 3 legend: green vertices is unvisited gray vertices is queued black vertices is visited orange vertex is a current vertex blue arrows is a path we go red arrows is a direction we can’t go breadth first search (bfs) algorithms and data structures course visited vertices: {1, 2, 4, 6} queue: {7, 5} current vertex: 6 1 2 4 6 7 8 5 3 legend: green vertices is unvisited gray vertices is queued black vertices is visited orange vertex is a current vertex blue arrows is a path we go red arrows is a direction we can’t go breadth first search (bfs) algorithms and data structures course visited vertices: {1, 2, 4, 6} queue: {7, 5} current vertex: 6 1 2 4 6 7 8 5 3 legend: green vertices is unvisited gray vertices is queued black vertices is visited orange …
5 / 45
7 8 5 3 legend: green vertices is unvisited gray vertices is queued black vertices is visited orange vertex is a current vertex blue arrows is a path we go red arrows is a direction we can’t go breadth first search (bfs) algorithms and data structures course visited vertices: {1, 2, 4, 6, 7} queue: {5, 3} current vertex: 7 1 2 4 6 7 8 5 3 legend: green vertices is unvisited gray vertices is queued black vertices is visited orange vertex is a current vertex blue arrows is a path we go red arrows is a direction we can’t go breadth first search (bfs) algorithms and data structures course visited vertices: {1, 2, 4, 6, 7} queue: {5, 3} current vertex: - 1 2 4 6 7 8 5 3 legend: green vertices is unvisited gray vertices is queued black vertices is visited orange vertex is a current …

Хотите читать дальше?

Скачайте все 45 страниц бесплатно через Telegram.

Скачать полный файл

О "breadth first search (bfs)"

breadth first search (bfs) breadth first search (bfs) algorithms and data structures course breadth first search (bfs) bfs is also a method to traverse graph. algorithm: algorithms and data structures course bfs(v) { add v to queue q while q is not empty take front vertex u from q remove front vertex of q mark u as visited for all unvisited adjacent vertices w of u add w to the q } breadth first search (bfs) algorithms and data structures course visited vertices: {} queue: {} current vertex: - legend: green vertices is unvisited gray vertices is queued black vertices is visited orange vertex is a current vertex blue arrows is a path we go red arrows is a direction …

Этот файл содержит 45 стр. в формате PPTX (303,9 КБ). Чтобы скачать "breadth first search (bfs)", нажмите кнопку Telegram слева.

Теги: breadth first search (bfs) PPTX 45 стр. Бесплатная загрузка Telegram