作者jas1123kimo (傑森)
看板Grad-ProbAsk
標題[理工] 演算法,原文書一題amortized
時間Mon Dec 23 16:25:03 2013
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