xgqfrms™, xgqfrms® : xgqfrms's offical website of cnblogs! xgqfrms™, xgqfrms® : xgqfrms's offical website of GitHub!

Algorithm Big(O) Notation All In One

Algorithm Big(O) Notation All In One

算法复杂度 - 大O 表示法

时间复杂度:

程序的执行时间长短

空间复杂度:

内存占用空间大小

算法优化 / 性能优化

Big(O) Notation

Function Big(O) Notation 中文说明
Constant O(c) const 常量,取 1 ~ n
Logarithmic O(log(n)) n 的对数次幂
Linear O(n) n 次
Quadratic O(n^2) n 的 2 次方(平方)
Cubic O(n^3) n 的 3 次方(立方)
Exponential O(2^n) 2 的 n 次方(次幂)
Factorial O(n!) n 的阶乘

Big(O) Notation Complexity Graph

O(1) < O(log(n)) < O(n) < O(n * log(n)) < O(n^2) < O(n^3) < O(2^n) < O(n!)

https://www.bigocheatsheet.com/

CS50

Big Ω (Big-Omega) notation

Big Ω 分析最好的情况下

Big(O) 分析最坏的情况下

https://www.youtube.com/playlist?list=PLhQjrBD2T381k8ul4WQ8SQ165XqY149WW

refs

https://en.wikipedia.org/wiki/Big_O_notation

https://algodaily.com/lessons/understanding-big-o-and-algorithmic-complexity

2022 最新字节跳动前端面试算法题 All In One

https://www.cnblogs.com/xgqfrms/p/16372741.html



©xgqfrms 2012-2020

www.cnblogs.com/xgqfrms 发布文章使用:只允许注册用户才可以访问!

原创文章,版权所有©️xgqfrms, 禁止转载 🈲️,侵权必究⚠️!


posted @   xgqfrms  阅读(36)  评论(2编辑  收藏  举报
相关博文:
阅读排行:
· TypeScript + Deepseek 打造卜卦网站:技术与玄学的结合
· Manus的开源复刻OpenManus初探
· AI 智能体引爆开源社区「GitHub 热点速览」
· C#/.NET/.NET Core技术前沿周刊 | 第 29 期(2025年3.1-3.9)
· 从HTTP原因短语缺失研究HTTP/2和HTTP/3的设计差异
历史上的今天:
2021-06-16 webpack warning All In One
2021-06-16 element-ui & form ref bug All In One
2020-06-16 macOS 显示/隐藏 AirPlay
2020-06-16 Flutter Search Component
2020-06-16 Android Studio show whitespace & Android studio 设置注释缩进
2019-06-16 Flutter framework & Flutter basics
2019-06-16 软件水平考试 2020 All In One
点击右上角即可分享
微信分享提示