You may write a small test program and try it yourself. It will fail at some N's because you may get into a dead loop.
回複:回複:一道程序題
所有跟帖:
•
回複:回複:回複:一道程序題
-亂彈-
♂
(164 bytes)
()
07/24/2009 postreply
16:24:36
•
可以這樣
-說了就走-
♂
(366 bytes)
()
07/25/2009 postreply
11:34:08
•
計算時間是否常數(或平均是常數), 不是很明顯。
-亂彈-
♂
(0 bytes)
()
07/27/2009 postreply
21:25:41
•
似乎很明顯
-說了就走-
♂
(183 bytes)
()
07/28/2009 postreply
16:07:49
•
主要問題是隻能用const memory
-康MM-
♀
(88 bytes)
()
07/28/2009 postreply
16:37:05
•
似乎沒有那麽複雜
-說了就走-
♂
(803 bytes)
()
07/29/2009 postreply
21:45:44
•
回複:似乎沒有那麽複雜
-康MM-
♀
(104 bytes)
()
07/30/2009 postreply
07:33:36
•
我覺得我解釋不清楚
-說了就走-
♂
(1593 bytes)
()
07/30/2009 postreply
11:56:00
•
主要是難以判斷一個位置有沒有排好。
-亂彈-
♂
(355 bytes)
()
07/30/2009 postreply
17:30:25
•
你可以run一下這個程序,對任何n都適用
-說了就走-
♂
(357 bytes)
()
07/30/2009 postreply
20:47:50
•
你一直在假設a[k]=k。沒有這個假設你的算法不成立
-康MM-
♀
(0 bytes)
()
07/31/2009 postreply
07:14:51
•
那麽請問你的假設是什麽?
-說了就走-
♂
(216 bytes)
()
07/31/2009 postreply
18:16:46
•
還是問冬瓜太郎吧,他說可以就可以
-康MM-
♀
(177 bytes)
()
08/02/2009 postreply
10:25:52
•
你說得很有道理
-說了就走-
♂
(2675 bytes)
()
08/02/2009 postreply
13:50:02
•
我還是覺得我們在說兩件不同的事
-康MM-
♀
(0 bytes)
()
08/06/2009 postreply
17:49:24