看板 Grad-ProbAsk 關於我們 聯絡資訊
http://goo.gl/E9c7vB 如題 第一題 A sequence of stack operations is performed on a stack whose size never exceeds k. After every k operations, a copy of the entire stack is made for backup purposes. Show that the cost of n stack operations, including copying the stack, is O(n) by assigning suitable amortized costs to the various stack operations. 題目是什麼意思... 有人知道嗎 -- ※ 發信站: 批踢踢實業坊(ptt.cc) ◆ From: 140.114.78.123
A4P8T6X9:一個大小k的stack,每做k次要備份整個stack一次,證明做n 12/23 17:02
A4P8T6X9:次的複雜度是O(n),我猜是每次input,當兩個,其中一個 12/23 17:02
A4P8T6X9:給以後備份用。 12/23 17:02
jas1123kimo:感謝! 12/23 19:14