回复:一道程序题

来源: 乱弹 2009-07-23 12:30:38 [] [博客] [旧帖] [给我悄悄话] 本文已被阅读: 次 (137 bytes)
There is always a loop: a--b--c...--a (means a need to take b's position, etc). Using this fact you can easily get a linear algorithm.

所有跟帖: 

回复:回复:一道程序题 -东瓜太郎- 给 东瓜太郎 发送悄悄话 (119 bytes) () 07/23/2009 postreply 14:02:55

回复:回复:回复:一道程序题 -乱弹- 给 乱弹 发送悄悄话 乱弹 的博客首页 (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- 给 康MM 发送悄悄话 康MM 的博客首页 (88 bytes) () 07/28/2009 postreply 16:37:05

似乎没有那么复杂 -说了就走- 给 说了就走 发送悄悄话 说了就走 的博客首页 (803 bytes) () 07/29/2009 postreply 21:45:44

回复:似乎没有那么复杂 -康MM- 给 康MM 发送悄悄话 康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- 给 康MM 发送悄悄话 康MM 的博客首页 (0 bytes) () 07/31/2009 postreply 07:14:51

那么请问你的假设是什么? -说了就走- 给 说了就走 发送悄悄话 说了就走 的博客首页 (216 bytes) () 07/31/2009 postreply 18:16:46

还是问冬瓜太郎吧,他说可以就可以 -康MM- 给 康MM 发送悄悄话 康MM 的博客首页 (177 bytes) () 08/02/2009 postreply 10:25:52

你说得很有道理 -说了就走- 给 说了就走 发送悄悄话 说了就走 的博客首页 (2675 bytes) () 08/02/2009 postreply 13:50:02

我还是觉得我们在说两件不同的事 -康MM- 给 康MM 发送悄悄话 康MM 的博客首页 (0 bytes) () 08/06/2009 postreply 17:49:24

请您先登陆,再发跟帖!

发现Adblock插件

如要继续浏览
请支持本站 请务必在本站关闭Adblock

关闭Adblock后 请点击

请参考如何关闭Adblock

安装Adblock plus用户请点击浏览器图标
选择“Disable on www.wenxuecity.com”

安装Adblock用户请点击图标
选择“don't run on pages on this domain”