阿摩線上測驗
登入
首頁
>
公職◆資料結構
>
100年 - 100年關務三等資料結構#46319
>
題組內容
一、下圖為二元搜尋樹(binary search tree),請回答下列問題:
⑸寫出 postorder traversal。
其他申論題
⑴35 的 successor 為何?
#157819
⑵50 的 successor 為何?
#157820
⑶寫出 Entry successor(Entry e) 的 pseudo code。
#157821
⑷寫出 preorder traversal。
#157822
⑹寫出 inorder traversal。
#157824
⑴畫出 min heap 實際上在大小為 10 的 array 中的 data structure。
#157825
⑵insert 11 至 min heap 之後, 1.畫出 insert 後的 tree-like min heap。 2.畫出其 array data structure。
#157826
⑶承上,再 delete root 且向 left sub-tree 調整, 1.畫出調整後的 tree-like min heap。 2.畫出其 array data structure。
#157827
三、用 HashMap 的 Java data structure 畫出此 directed weighted graph。
#157828
四、找出張三到王五的 Dijkstra’s Shortest Path,要畫出 3 個 data structures: 1. weight sum2. predecessor 3. priority queue 的最後結果。
#157829