問題詳情

30. 下列何種資料結構最適合用於 BFS 搜尋演算法?
(A)STACK
(B)QUEUE
(C)TREE
(D)Linked List 。

參考答案

答案:B
難度:困難0.337748
統計:A(25),B(51),C(38),D(9),E(0)

用户評論

Be a top spot】評論

廣度優先搜尋法(Breadth-first Search)Breadth-first search (BFS) is a strategy for searching in a graph.The BFS begins at a root node and inspects all the neighboring nodes. Then for each of those neighbor nodes in turn, it inspects their neighbor nodes which were unvisited, and so on. (參1)廣度優先搜尋法,是一種圖形(graph)搜索演算法。從圖的某一節點(vertex, node)開始走訪,接著走訪此一節點所有相鄰且未拜訪過的節點,由走訪過的節點繼續進行先廣後深的搜尋。以樹(tree)來說即把同一深度(level)的節點走訪完,再繼續向下一個深度搜尋,直到找到目的節點或遍尋全部節點。廣度優先搜尋法屬於盲目搜索(uninformed searc...