全部书籍

专业

应用 关于 Coach 登录 开始阅读

书籍暂未推出简体中文版——当前显示英文版。

Computer Science · 术语表

什么是 Breadth-first search, BFS tree?

又称: breadth-first search · BFS tree

Definition 24.17 University Computer Science — Year 1 · 第 24 章 — Graphs and Traversals

A breadth-first search from ss keeps a queue of discovered vertices, initially ss; it removes the vertex uu at the head and discovers each undiscovered neighbour vv of uu, setting dist[v]=dist[u]+1\texttt{dist}[v] = \texttt{dist}[u] + 1 and the parent of vv to uu, and adds it at the tail. The parent links form the BFS tree, rooted at ss.

在原文中阅读 →