看板 Grad-ProbAsk 關於我們 聯絡資訊
請教一下,這是cormen的習題,有兩題不太知道怎麼寫.. 1) Rewrite the MERGE procedure so that it does not use sentinels, instead stopping once either array L or R has had all its elements copied back to A and then copying the remainder of the other array back into A. 2) Insertion sort can be expressed as a recursive procedure as follows. In order to sort A[1..n], we recursively sort A[1..n -1] and then insert A[n] into the sorted array A[1..n - 1]. Write a recurrence for the running time of this recursive version of insertion sort. 希望有前輩能指導一下 謝謝幫忙 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.136.149.125
bernachom:這習題有人可以幫個忙嗎...謝謝 09/27 09:35
volleyer:第二題的recurrence...是指這個嗎 T(n)=T(n-1)+n/2 09/27 21:07
bernachom:我要想一下.. 09/28 16:56