看板 Grad-ProbAsk 關於我們 聯絡資訊
96台大電機丙DS 第三題 已經知道pos位置 要插入 求時間複雜度 網路上給答案是O(1) 因為知道位置 可是我覺得是O(n) 因為point還是要從 head or tail 一個一個去link -- When we toss a coin , we obtain either head or tail. Now we toss a coin 5 times. There are 2^5 possible outcomes. How many of them contain no two consecutive heads? -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 59.105.81.54
metalalive:POS在這邊題意好像是指data要插入哪個位置,題目又有說 12/25 12:23
metalalive:POS是pointer,所以pos可直接連到欲插入的位置 12/25 12:25
metalalive:98台大資工也有類題,我釋參考答案的解釋 12/25 12:26
bjk:感恩~~~ 12/25 17:46