Breadth-First Search
     
   Step-by-Step Animation   Animation Speed 
Elaboration:
?
Breadth-First Search(BFS): BFS is a graph algorithm that explores the closest nodes first. Therefore, it's commonly used to find the shortest path between a starting node and an ending node. The time complexity of BFS is O(|V| + |E|) where V is the number of nodes and E is the number of edges, since every node and every edge will be visited in the worse case.
Input Explanations:
1. starting node: The starting node to begin the traversal
2. ending node: This is an optional input. If this is specified DFS will try to find a path between the starting node and ending node

广度优先搜索定义:已知图G=(V,E)和一个源顶点s,广度优先搜索以一种系统的方式探寻G的边,从而“发现”s所能到达的所有顶点,并计算s到所有这些顶点的距离(最少边数),该算法同时能生成一棵根为s且包括所有可达顶点的宽度优先树。对从s可达的任意顶点v,广度优先树中从s到v的路径对应于图G中从s到v的最短路径,即包含最小边数的路径。该算法对有向图和无向图同样适用。
按键说明:Run BFS:从输入的节点出发,先遍历这个节点的相邻节点,再依次遍历每个相邻节点的相邻节点。