作者yantchen (球童Yanting)
看板NTUE-CS101
标题[课业] 考古题翻译
时间Mon Jan 18 21:46:47 2010
考古题记得看一下
明天看到题目就会 嘿嘿
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)
1F:推 aeolus1215:现在看起来才觉得当年王振慈出的题目很佛心 01/19 00:12
2F:→ aeolus1215:考试都直接叫你写quick sort演算法... 01/19 00:12
3F:推 harry5438:怎麽这麽难 01/20 11:22