手机版
热门标签
站点地图
我要投稿
广告合作
联系我们
搜 索
广告位招租
广告位招租
切换导航
首页
人工智能
编程教程
编程导航
编程百科
编程问答
编程博文
编程实例
硬件设备
网络运营
软件教程
移动数码
办公软件
操作系统
网络运维
技术频道
▸ 编程语言
▸ 前端开发
▸ 移动开发
▸ 开发工具
▸ 程序设计
▸ 行业应用
▸ CMS系统
▸ 服务器
▸ 数据库
公众号推荐
微信公众号搜
"智元新知"
关注
微信扫一扫可直接关注哦!
complexity-theory
complexity-theory专题提供complexity-theory的最新资讯内容,帮你更好的了解complexity-theory。
使用势法对斐波那契堆进行摊销分析
我正在尝试使用潜在方法对斐波那契堆进行摊销分析。我正在努力理解 pop min / delete min 操作的分析。
作者:佚名 时间:2022-10-02
下面函数的 BIG(O) 复杂度
请简单解释一下函数 sol 的 BIG(O) 时间复杂度。 谢谢 <pre><code>int sol(vector<int> v) { double osum = accu
作者:佚名 时间:2022-09-27
给定函数的复杂度是多少
有人可以告诉我函数的复杂性是什么,为什么? 谢谢 <pre><code>def func1(n): if n==0: return (1) i
作者:佚名 时间:2022-09-21
我如何为这个大的 Omega-Notation 想出正确的 c 和 n0?
我应该展示<code>n^3 + 12*n^2 != Ω(n^4)</code>。为了表明这一点,我想解决 n 的以下不等式,但我有点卡住了
作者:佚名 时间:2022-09-08
bot Matrix 和 Adjacency List 的 BFS 和 DFS 的时间复杂度
<a href="https://i.stack.imgur.com/J1el1.png" rel="nofollow noreferrer">enter image description here</a> <a href="https://i.stack.
作者:佚名 时间:2022-08-24
这个时间复杂度是多少?
我想知道这段代码的时间复杂度 python3代码: <pre><code>def twoStacks(maxSum, a, b): # Write your code here su
作者:佚名 时间:2022-08-22
为什么 O(log(n)) 等于 O(log(n!))?
在解决代码的复杂性时,我发现它是 O(log(n!))。我知道这可以证明等于 O(n*log(n))。但是,有人能说出这个
作者:佚名 时间:2022-09-05
这种方法的 NPath 复杂度如何达到 1152?我怎样才能减少它?
这个方法怎么会有1152的NPATH复杂度?我在这段代码中看不到任何分支,除非它增加了 StringBuilder.append 的
作者:佚名 时间:2022-07-12
捕获雨水算法复杂度
试图解决 <a href="https://leetcode.com/problems/trapping-rain-water/" rel="nofollow noreferrer">Trapping Rain Water</a> 问题,但
作者:佚名 时间:2022-07-08
javascript – 如果只依赖于输入值而不是输入大小,如何确定Big-o复杂度?
我刚看到有关排序的javascript代码,如图所示使用setTimeoutvar list = [2, 5, 10, 4, 8, 32]; var result = []; list.forEach( n => setTimeout(() => result.push(n), n)); 这很有意思,因为在js中setTimeout是异步的,
作者:佚名 时间:2019-08-06
算法 – 从数组数组中获取最小值或最大值的最好方法是什么?
假设我有一个数组:[2,3,3,4,2,2,5,6,7,2] 在该数组中找到最小值或最大值的最好方法是什么? 现在,为了获得最大值,我循环通过数组,并重置变量为值,如果它大于现有值: var myArray:Array /* of Number */ = [2,3,3,4,2,2,5,6,7,2]; var maxValue:Number = 0; for each (var num:Numb
作者:佚名 时间:2019-05-03
php – 如何打印三角形形式的整数
我想打印三角形的整数,看起来像这样 1 121 12321 我试过这个,但我没有得到实际的结果 for($i=1;$i<=3;$i++) { for($j=3;$j>=$i;$j--) { echo ""; } for($k=1;$k<=$i;$k++) { echo $k; } if(
作者:佚名 时间:2020-06-30
Java 7的BigInteger操作有多复杂?
目前BigInteger中的方法有多大的复杂性,分裂和消耗?没有提到文档中的计算复杂性(也没有提到其他任何地方). 如果你看一下BigInteger的代码(JDK提供),我觉得 multiply(..)有O(n ^ 2)(实际上该方法是multiplyToLen(..)).其他方法的代码有点复杂,但你可以看到自己. 注意:这适用于Java 6.我假设它在Java 7中没有区别.
作者:佚名 时间:2020-04-10
算法 – 最坏情况运行时间的大O和Ω是最好的情况,但为什么有时在最坏的情况下使用Ω?
我很困惑,我认为你在最坏的情况下使用Big O运行时间,Ω是最好的情况?有人可以解释一下吗? 并不是(lg n)最好的情况?和(nlg n)是最坏的情况?还是我误解了什么? Show that the worst-case running time of Max-Heapify on a heap of size n is Ω(lg n). ( Hint: For a heap with n no
作者:佚名 时间:2020-02-11
Java Big O表示3嵌套循环的log(n)
对于以下嵌套循环,Big O表示法会是什么? for (int i = n; i > 0; i = i / 2){ for (int j = n; j > 0; j = j / 2){ for (int k = n; k > 0; k = k / 2){ count++; } } }
作者:佚名 时间:2019-07-20
算法 – 跟踪扩展阵列的中位数
面试问题: 下面编辑 给你一个数组.你做出2堆,一个minheap和另一个最大堆.现在使用O(nlog n)时间的这两个提供的堆,找到数组的中位数. 更正问题 数字随机生成并存储到(扩展)数组中.你如何跟踪中位数? 解 这个问题可以使用2堆来解决,而且中等值可以在O(1)时间内被访问. 以下是您如何使用这两个堆.注意,我假设你不知道元素的数量,这就是为什么我们必须弹出,直到我们从最小堆中弹出大于或
作者:佚名 时间:2019-06-28
java – 代码复杂性分析工具超越了循环复杂性
虽然循环复杂度是一个有价值的指标,但我倾向于认为它是识别难以维护代码的差工具.特别地,我倾向于发现它只是突出显示某些类型的代码(例如解析器),并且错过了难以递归,线程和耦合问题以及许多已定义的反模式. 还有哪些其他工具可用于识别有问题的Java代码? 请注意,我们已经使用PMD和FindBugs,我认为这是很好的方法级问题识别. 我的经验是,查看代码可维护性时最重要的指标是: >循环复杂性,以识别
作者:佚名 时间:2019-05-27
用于在Java中切换的McCabe Cyclomatic复杂性
我使用switch语句13个案例,每个案例只有一行返回值. 麦卡贝用红色涂抹.有没有更简单的方法来写一个大的switch语句?看起来似乎不复杂,但我不喜欢默认设置变红.如果其他人在我的代码上使用相同的工具,看到红色的东西,他们可能认为我很愚蠢:-) 编辑:我将不同的SQL类型映射到我自己的更抽象类型,从而减少总数量的类型. case Types.TIME: return AbstractD
作者:佚名 时间:2019-05-08
java – 具有log n复杂度的外部循环的两个依赖循环的复杂度
问题 计算这个算法的复杂性: for(i=n; i>1;i=i/2) for(j=i;j<n;j++){ statement; } 以前我对此主题做了些什么: 第一个循环运行logn时间. 第二个循环运行n-i次,i从n开始,并在每个外循环迭代中改变为i / 2.所以内循环运行如下: n-n 0 times n
作者:佚名 时间:2019-05-04
我应该考虑memmove()O(n)还是O(1)?
这可能是一个愚蠢的问题,但我想计算一个算法的复杂性,我不确定 memmove()函数要考虑的复杂性. 你能帮忙/解释一下吗? void * memmove ( void * destination, const void * source, size_t num ); 复杂度O(num)或O(1)也是如此.我想这是O(num),但我不确定我现在缺乏对引擎盖下发生的事情的理解. 由于memmove的
作者:佚名 时间:2019-09-01
上一页
7
8
9
10
11
12
13
14
15
下一页
小编推荐
苹果市值2025年有望达4万亿美元
• 联想拯救者新一代Y700平板通过IMDA认证
• 最新AI生图模型Flux1.1刷屏!添加单反相
• 联发科天玑 9400 频率敲定,3.626GHz 最
• 苹果新品发布会来了!5款产品面临停产
• 佳能R5C Mark II配置曝光:双系统设计,
• AI应用的东风,奥特曼不想错过
• 为新品让路!苹果定制版Mac发货延期
热门标签
更多
python
JavaScript
java
HTML
PHP
reactjs
C#
Android
CSS
Node.js
sql
r
python-3.x
MysqL
jQuery
c++
pandas
Flutter
angular
IOS
django
linux
swift
typescript
路由器
JSON
路由器设置
无线路由器
h3c
华三
华三路由器设置
华三路由器
电脑软件教程
arrays
docker
软件图文教程
C
vue.js
laravel
spring-boot