[課業] 考古題翻譯

看板NTUE-CS101作者 (球童Yanting)時間16年前 (2010/01/18 21:46), 編輯推噓2(201)
留言3則, 2人參與, 最新討論串1/2 (看更多)
考古題記得看一下 明天看到題目就會 嘿嘿 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
考試都直接叫你寫quick sort演算法...
01/19 00:12, 2F

01/20 11:22, , 3F
怎麼這麼難
01/20 11:22, 3F
文章代碼(AID): #1BL6PAK1 (NTUE-CS101)
文章代碼(AID): #1BL6PAK1 (NTUE-CS101)