阿摩線上測驗
登入
首頁
>
研究所、轉學考(插大)◆資料結構及演算法
>
110年 - 110 國立政治大學_碩士班暨碩士在職專班招生考試_資訊科學系:資料結構及演算法#105973
> 申論題
題組內容
8. (10%) Consider a 500-node binary heap, whose array representation is stored in Arr. Let p be a node in the binary heap. Further assume that u is p's child node and u's key is stored at Arr[305].
a. (5%) How to find p's key in Arr?
相關申論題
a. (5%) The time complexity of any sorting algorithm is 0(n2).
#452247
b. (5%) The best-case time complexity of insertion sort is θ(n logn).
#452248
a. (5%) If a problem is in NP-hard, then the problem is in NP.
#452249
b. (5%) If a problem is in NP, then the problem is in NP-complete.
#452250
3.(15%) Use an example to explain why Dijkstra's shortest path algorithm cannot be applied to graphs with negative edge weights. In your example graph, please highlight the source and the destination.
#452251
4. (10%) Give two advantages of red black trees over hash tables.
#452252
5. (15%) An independent set I of an undirected graph G = (V,E) is a subset of V such that for any two vertices u and v in I, u and o are not adjacent,i.e.,. Design a dynamic program to find the largest independent set in a tree. ***Please explain the high-level idea of your answer in English or Chinese. ***
#452253
6. (15%) Consider an n-node sorted singly linked list L, where the first node (ie., the head) stores the smallest data, the last node (i.e., the tail) stores the largest data, and thenode stores the smallest data. Given the address of L's head and a key, is it possible to search for the key in L in O(logn) time? Please explain your answer.
#452254
7. (15%) Design a polynomial-time algorithm for the following problem. Input: An n-node undirected graph G. Output: "'Yes', if there is a cycle of length at most n/2 (i.e., a cycle that has at most n/2 nodes) in G; "No", otherwise. ***Please give the high-level idea of your algorithm and explain why it has polynomial running time. ***
#452255
b. (5%) Does u have a left child node in the binary heap? Please explain your answer.
#452257
相關試卷
110年 - 110 國立政治大學_碩士班暨碩士在職專班招生考試_資訊科學系:資料結構及演算法#105973
110年 · #105973