阿摩線上測驗
登入
首頁
>
研究所、轉學考(插大)◆資料結構與演算法
>
111年 - 111 國立臺北大學_碩士班一般入學考試試題_資訊工程學系:資料結構與演算法#147272
> 申論題
題組內容
1.(5分)
(5分) (B)使用quick sort 排序數列 40 78 35 12 6 28 51 67 22 89 3 19 58。並且說明每次移動數字時,所使用的條件和基準。
相關申論題
(A)將此inorder statement:A(B+C)+EF-H/I 轉為postorder,並畫出它的二元樹。
#605653
(10分)(B)設計一個算法使用stack來實現上述 inorder轉postorder,並且以上述statement說明如何使用stack來做轉換。
#605654
3.(10分)使用linked list實作stack,運用以下C語言程式:typedef struct node { int value; node *next;}void push (node **top, int new_value) { // assume top is not nullnode new_node = (node ) malloc (sizeof (node));// 實作以下敘述// add new_node to stack by top}int pop (node **top) { // assume top is not nullint value;node deleting_node = top;// 實作以下敘述// remove the deleting node from stackfree(deleting_node);return value;}
#605655
4.(15分)使用stack解決老鼠走迷宫問題(Maze path search),設計並描述如何實作,包含(1)如何搜尋八個方向來移動(2)如何找到合法移動和出口(3)解決死路問題
#605656
5.(15分)Given a graph \( G = (V,E) \) where \( V = \{1,2,3,\dots,n\} \) and \( E = \{e1,e2,\dots,e_m\} \), show an algorithm to find out if a vertex \( j\in V \) is reachable from another vertex \( i\in V \) for all vertex pairs \( (i,j) \) in the given graph. The running time of your algorithm should be within \( O(n^3) \).
#605657
6.(15分)Run the Kruskal's algorithm to find a minimum spanning tree for the following graph step by step.
#605658
7.(10分)Run the insertion sort on the following array: (14,10,3,8,6,4,13) step by step.
#605659
8.(10分)Give an asymptotic upper bound for \( \mathrm{T(n)} = 7\mathrm{T}\left(\lfloor \mathrm{n} / 3\rfloor \right) + \mathrm{n}^2 \) where \( \mathrm{T(n)} \) is constant for \( \mathfrak{n} < 3 \). Your upper bound should be as tight as possible.
#605660
相關試卷
115年 - 115 國立臺北大學_碩士班一般入學考試試題_資訊工程學系:資料結構與演算法#147260
115年 · #147260
114年 - 114 國立臺北大學_碩士班一般入學考試試題_資訊工程學系:資料結構與演算法#147250
114年 · #147250
111年 - 111 國立臺北大學_碩士班一般入學考試試題_資訊工程學系:資料結構與演算法#147272
111年 · #147272
110年 - [非官方正解]110 國立臺灣大學_碩士班招生考試_電信工程研究所丙組:資料結構與演算法(B)#113108
110年 · #113108
110年 - [非官方正解]110 國立中央大學_碩士班招生考試_資工類:資料結構與演算法#105890
110年 · #105890
109年 - 109 東吳大學_轉學生招生考試_資訊管理學系三年級︰資料結構#105850
109年 · #105850
104年 - [非官方正解]104 國立交通大學_碩士班考試入學試題_資訊聯招:資料結構與演算法#113199
104年 · #113199