大O注释代码示例

编程入门 行业动态 更新时间:2024-10-18 06:11:25
本文介绍了大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注释代码示例

本文发布于:2023-11-29 17:03:36,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/1647034.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:示例   注释   代码

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!