确定代码的时间复杂度

编程入门 行业动态 更新时间:2024-10-19 20:41:30
本文介绍了确定代码的时间复杂度的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

我想知道详细的时间复杂性此代码

I want to know the time complixity in details for this code

展开 | 选择 | 换行 | 行号 推荐答案

以及此代码的时间复杂性 and also the time complixity for this code pls 展开 | 选择 | Wrap | 行号

对于fun()的第一个平均复杂度,常量等于2. 第二个它太长了,没读过但是它的外观是河内塔的问题及其复杂性,例如在维基百科文章。 For the first average complexity of fun() is constant equals 2. The second it too long, didn''t read it but it''s looks Towers of Hanoi problem and its complexity is explained e.g. in wikipedia article.

此外,使用代码标签可以帮助其他人阅读并提供帮助。 Also, using the code tag would help others read it and provide help.

更多推荐

确定代码的时间复杂度

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

发布评论

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

>www.elefans.com

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