当前位置:网站首页>Time complexity (see which sentence is executed the most times)
Time complexity (see which sentence is executed the most times)
2022-07-06 10:14:00 【megaData】
1.T (n) = O (f (n)) among f(n) Represents the sum of execution times per line of code ; and O Represents a positive proportional relationship
- Constant order O(1)
- Logarithmic order O(logN)
- Linear order O(n)
- Linear logarithmic order O(nlogN)
- Square order O(n²)
- Cubic order O(n³)
- K Order of second order O(n^k)
- Exponential order (2^n)
- The time complexity from top to bottom is increasing , Less efficient execution .
- Input range exceeds 10 Of 5 Power , Use both scanf no need cin
{
if(T(n) Constant )
{
The time complexity is O(1);
}
else
{
The time complexity is O( Retain T(n) And remove the coefficient of the highest order );
}
} Time complexity ( How many cycles are there , The time complexity is O(n To what power ));
IF Yes x Recirculation , The time complexity is O(n Of x Power );
The time complexity changes from fast to slow :O(1),O(logn),O(n),O(nlogn),O(n^2),O(n^3),O(2^n);
No matter how many lines of code are executed , As long as there is no complex structure such as circulation , So the time complexity of this code is very high O(1)
边栏推荐
- CANoe下载地址以及CAN Demo 16的下载与激活,并附录所有CANoe软件版本
- Delayed note learning
- [NLP] bert4vec: a sentence vector generation tool based on pre training
- MySQL combat optimization expert 06 production experience: how does the production environment database of Internet companies conduct performance testing?
- MySQL Real Time Optimization Master 04 discute de ce qu'est binlog en mettant à jour le processus d'exécution des déclarations dans le moteur de stockage InnoDB.
- Southwest University: Hu hang - Analysis on learning behavior and learning effect
- docker MySQL解决时区问题
- Routes and resources of AI
- Safety notes
- MySQL实战优化高手10 生产经验:如何为数据库的监控系统部署可视化报表系统?
猜你喜欢

17 医疗挂号系统_【微信支付】

Not registered via @EnableConfigurationProperties, marked(@ConfigurationProperties的使用)

Super detailed steps to implement Wechat public number H5 Message push

Control the operation of the test module through the panel in canoe (Advanced)

C杂讲 浅拷贝 与 深拷贝
![[Julia] exit notes - Serial](/img/d0/87f0d57ff910a666fbb67c0ae8a838.jpg)
[Julia] exit notes - Serial

The 32-year-old fitness coach turned to a programmer and got an offer of 760000 a year. The experience of this older coder caused heated discussion

四川云教和双师模式

软件测试工程师必备之软技能:结构化思维

Docker MySQL solves time zone problems
随机推荐
17 医疗挂号系统_【微信支付】
14 medical registration system_ [Alibaba cloud OSS, user authentication and patient]
MySQL底层的逻辑架构
Listen to my advice and learn according to this embedded curriculum content and curriculum system
[after reading the series of must know] one of how to realize app automation without programming (preparation)
Download address of canoe, download and activation of can demo 16, and appendix of all canoe software versions
Sichuan cloud education and double teacher model
Super detailed steps to implement Wechat public number H5 Message push
Competition vscode Configuration Guide
Canoe cannot automatically identify serial port number? Then encapsulate a DLL so that it must work
MySQL combat optimization expert 02 in order to execute SQL statements, do you know what kind of architectural design MySQL uses?
CDC: the outbreak of Listeria monocytogenes in the United States is related to ice cream products
Contest3145 - the 37th game of 2021 freshman individual training match_ C: Tour guide
MySQL combat optimization expert 06 production experience: how does the production environment database of Internet companies conduct performance testing?
简单解决phpjm加密问题 免费phpjm解密工具
Safety notes
Super detailed steps for pushing wechat official account H5 messages
MySQL combat optimization expert 04 uses the execution process of update statements in the InnoDB storage engine to talk about what binlog is?
Delayed note learning
16 医疗挂号系统_【预约下单】