CS61A学习笔记-lec20

Complexity

python或者unix提供了很多工具,比如timeit包

当然我们研究的应该是worst case

在complexity中,我们应该忽视一些无关痛痒的细节,比如建立迭代器的时间,比如每次循环返回在调用next()的时间,找到其中有意义更通用的东西。

Professor这里提到的很有意思

You've got to take an infinite amount of time, and you're taking infinite amount of time,what more i can ask?right.

Effiency(P): theoretically optimal time to compute result of P / execution time of my program on P

最后一段话:

If you prove that instead P = NP,you could bring about the end of civilization as we know it,but that's another story.

全部评论

相关推荐

点赞 收藏 评论
分享
牛客网
牛客企业服务