手机版
热门标签
站点地图
我要投稿
广告合作
联系我们
搜 索
广告位招租
广告位招租
切换导航
首页
人工智能
编程教程
编程导航
编程百科
编程问答
编程博文
编程实例
硬件设备
网络运营
软件教程
移动数码
办公软件
操作系统
网络运维
技术频道
▸ 编程语言
▸ 前端开发
▸ 移动开发
▸ 开发工具
▸ 程序设计
▸ 行业应用
▸ CMS系统
▸ 服务器
▸ 数据库
公众号推荐
微信公众号搜
"智元新知"
关注
微信扫一扫可直接关注哦!
complexity-theory
complexity-theory专题提供complexity-theory的最新资讯内容,帮你更好的了解complexity-theory。
c – 使用快速排序观察二次行为 – O(n ^ 2)
quicksort算法的平均时间复杂度为O(n * log(n)),最差情况复杂度为O(n ^ 2). 假设Hoare的快速排序算法有一些变体,哪种输入会导致快速排序算法表现出最差的复杂性? 请说明与特定快速排序算法的实施细节相关的任何假设,例如枢轴选择等,或者它是否来自诸如libc之类的常用库. 一些阅读: > A Killer Adversary for Quicksort > Quickso
作者:佚名 时间:2019-09-27
c – std :: find_end作为Big-O的复杂性
如何将std :: find_end算法的复杂性表示为Big-O表示法? std :: find_end的复杂性定义如下: At most (last2 - first2) * (last1 - first1 - (last2 - first2) + 1) applications of the corresponding predicate. 它将是O(M *(N-M)),其中N是序列1中元素的
作者:佚名 时间:2019-11-18
C语言中memset函数的复杂性
我和一些朋友讨论了一段代码,我们讨论了在C中使用memset函数,如果我们初始化一个大小为N的数组,这个函数的Big-O表示法的顺序是什么? 在您可以直接访问页表并且以分层方式存储的系统上,通过将整个虚拟地址映射替换为对单个页面的写时复制引用,可以在O(log n)中实现memset填充给定的字节值.但请注意,如果您将来对该对象进行任何修改,则memset的正常O(n)成本将被推迟到页面错误,以在
作者:佚名 时间:2019-12-01
C STL:清理后的集装箱重建或重用?
在编程中,我们面临各种需要使用中间STL容器的情况,如下例所示: while(true) { set < int > tempSet; for (int i = 0; i < n; i ++) { if (m.size() == min && m.size() <= max) { tempSet.insert(i);
作者:佚名 时间:2019-12-14
c – 如何迭代哈希表实现?
我正在尝试了解如何迭代哈希表实现.我只是无法想象它.我对这种迭代的速度特别感兴趣.例如: QHash<int, std::string> hashTable; ... for (auto it = hashTable.begin(); it != hashTable.end(); ++it) std::cout << it.value() << std::endl; 这是O(hashTab
作者:佚名 时间:2020-01-08
c – “不变”的复杂性是什么意思?时间?份数/动作数
我可以想到C中的三个操作,可以在某种意义上被描述为具有“不变”的复杂性.我已经看到了这个意思的一些辩论(*),在我看来,我们可以说“所有这些操作是不变的,但有些比其他人更为常态”:-) (编辑2:如果你已经认为你知道答案,请阅读这个问题的一些辩论,然后才赶上:What data structure, exactly, are deques in C++?很多人,相当高分,都在争论“不变”的意思,我
作者:佚名 时间:2020-01-12
c – stl deque :: insert()的复杂性
我从C标准2003(第23.2.1.3章)中了解了deque :: insert()的复杂性,如下所示: 在最坏的情况下,将单个元素插入到双端队列中需要时间在从插入点到双端队列开始的距离的最小值以及从插入点到双端队列结束的距离的线性. 我总是将stl deque的实现理解为内存块的集合.因此,插入仅影响与插入位置相同的存储块中的元素.我的问题是,标准是什么意思是“从插入点到双端队列开始的距离的最小
作者:佚名 时间:2019-12-22
c – std :: remove和std :: remove_if设计的稳定性是否失败?
最近(从一个SO评论)我了解到std :: remove和std:remove_if是稳定的.我觉得这是一个糟糕的设计选择,因为它阻碍了某些优化,我错了吗? 想象一下,删除1M std :: vector的第一个和第五个元素.由于稳定性,我们无法使用swap实现删除.相反,我们必须改变每一个剩下的元素.
作者:佚名 时间:2019-06-26
c# – 如何提高循环复杂性?
对于具有大量决策语句(包括if / while / for语句)的方法,Cyclomatic Complexity将很高.那么我们如何改进呢? Cos我正在处理一个大项目,我应该减少CC的方法有CC>这个问题有许多方法.下面我会列出一些例如代码模式(而不是实际的代码)与我遇到的问题.是否可以简化它们? 导致许多决策声明的案例示例: 情况1) if(objectA != null) //object
作者:佚名 时间:2020-02-19
c# – 从集合创建HashSet的最差案例复杂度
我有一个int值集合,它填充一个HashSet< int>以下列方式 – var hashSet = new HashSet<int>(myIEnumerable); 假设迭代IEnumerable是O(n),那么创建HashSet< int>以这样的方式? 文件实际上指出: This constructor is an O(n) operation, where n is the number
作者:佚名 时间:2019-06-21
上一页
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