yanwumo's recent timeline updates
yanwumo

yanwumo

V2EX member #27451, joined on 2012-10-01 12:07:07 +08:00
yanwumo's recent replies
Dec 26, 2016
Replied to a topic by lxiange 程序员 来看看这个函数的时间复杂度是多少
@ipoh 是的,楼主的失误就在于他写成了代码,问题就变成用 int 实现时间复杂度是怎样了。
Dec 26, 2016
Replied to a topic by lxiange 程序员 来看看这个函数的时间复杂度是多少
因此,简单的判断质数的方法不能在多项式时间内完成。
Dec 26, 2016
Replied to a topic by lxiange 程序员 来看看这个函数的时间复杂度是多少
@lxiange 楼主正确
http://softwareengineering.stackexchange.com/questions/197374/what-is-the-time-complexity-of-the-algorithm-to-check-if-a-number-is-prime
判断一个数是否为质数和楼主的问题是相似的。这类问题的区别在于,问题的规模大小与数字本身的大小有关。
About   ·   Help   ·   Advertise   ·   Blog   ·   API   ·   FAQ   ·   Solana   ·   5792 Online   Highest 6679   ·     Select Language
创意工作者们的社区
World is powered by solitude
VERSION: 3.9.8.5 · 16ms · UTC 06:23 · PVG 14:23 · LAX 23:23 · JFK 02:23
♥ Do have faith in what you're doing.