所屬科目:研究所、轉學考(插大)◆資料結構及演算法
b. (5%) The best-case time complexity of insertion sort is θ(n logn).
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. ***
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.