※ 引述《newman1125 (newman)》之銘言:
: http://www.lib.ntu.edu.tw/exam/graduate/98/98398.pdf
: 1. (E)
g(n)=Ω(f(n)) --> 0 <= c x f(n) <= g(n)
--> 0 <= f(n) <= 1/c x g(n)
--> f(n) = O(g(n))
: 5. 如何知道這個Queue是用哪種類型的array做的?
題幹有說circular array
Function C() 裡也有一個 f=(f+1)%N
看得出來是Circular Queue
: 6. (D)
single list的刪除比較麻煩 尤其是他說的 given the pointer to the node to be
deleted 因為你要先找到這個pointer前的那個node來接下一個
但是single list要怎麼找前一個?只能從頭慢慢早
HEAD --> node1 --> node2 --> node3 --> node4 --> NULL
例如要砍node3 他給你的pointer已經指在node3了 但是你要想辦法把node2指到node4
否則list就斷了
double的話 找前一個很快啊 就另一個方向的link而已
: 9. (E)
random 所以 h=O(logn) 啊
但是我也不很確定 如果data已經sort好了 那就會變O(n)
不過他說random...
: 感謝
: 寫選項的只要針對選項就可以了
: 謝謝
--
※ 發信站: 批踢踢實業坊(ptt.cc)
◆ From: 114.39.172.115