本文介绍了大O注释代码示例的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
大家好 我已经进行了一段时间,但找不到任何有用的东西. 我想编写一个需要O(N ^ 4)时间的函数. 我想知道是否有一些算法具有O(N ^ 4)执行时间? 它应该是有用的算法,而不是简单的4 for-loop做有趣的事情!!! 任何建议都会有所帮助. 预先感谢.
Hey guys I''ve been on this for while but i couldn''t find any useful thing. I want to write a function which takes O(N^4) time. I wonder to know if there is some algorithm which has O(N^4) execution time? It should be useful algorithm, not simply 4 for-loop which does a funny things!!! Any suggestion will help. Thanks in advance.
推荐答案为什么? 通常,您尝试为算法制定Omicron,而不是采用其他方法... 不过,我只能在这里找到一个:一种O(n4)算法,用于抢先调度一台机器,以最大程度地减少延迟的工作量 [ ^ ]我不知道您会怎么想进行测试... Why? Normally, you try to work out the Omicron for an algorithm, rather than the other way around... Still, the only one I could find was here: An O(n4) algorithm for preemptive scheduling of a single machine to minimize the number of late jobs[^] I have no idea how the heck you would test it though...
更多推荐
大O注释代码示例
发布评论