[課業] 考古題翻譯
考古題記得看一下
明天看到題目就會 嘿嘿
1.
Describe the algorithms for breadth-first
and depth-first search for the given graph G.
請描述 走訪圖形的 深度、廣度 演算法
→ 深度 就是有路就走到底 再換下一條 類似 in order
→ 廣度 就是有路就每個都走一步 走走看 類似 level order
補充一下: 因為 深度 廣度 可以用在maze(走迷宮)、tree、graph...
這裡是要你寫 用在graph的演算法
2.
State the Kruskal's and Prim's algorithms and use them to construct
the minimum cost spanning trees for the following graph.
List each stage in detail.
說明 Kruskal 、 Prim 演算法 並使用兩個演算法 解附圖的最小生成樹
要把步驟寫出來
→看課本的例圖吧
3.
Find all pairs of the shortest paths for the following graph.
List the stages as in textbook.
把附圖的路徑中 找出兩點之間最短路徑 使用課本的方法 寫出步驟
1 3
┌ a ┐
│7┌ c
o ┘/ 1
└ b
2
3,4圖不見了 先看左邊的圖吧 類似這樣的圖
像是 o->c 有 o->a->c 跟 o->c 兩種 oac=4, oc=7
所以 oc 最短是 4
4.
Find the shortest paths for the following graphs
form source O to all destinations.
List the action as in textbook.
把附圖的路徑中 找出原點到各點之間最短路徑 使用課本的方法 寫出步驟
5.
Using the quick , merge , and heap sorts to sort the following numbers.
List each step as in textbook.
22 8 67 6 55 19 36 21 30 29
將下列數字 用quick,merge,heap排序 使用課本方法 寫出步驟
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 120.127.36.183
※ 編輯: yantchen 來自: 120.127.36.183 (01/18 22:27)
推
01/19 00:12, , 1F
01/19 00:12, 1F
→
01/19 00:12, , 2F
01/19 00:12, 2F
推
01/20 11:22, , 3F
01/20 11:22, 3F
討論串 (同標題文章)