随笔分类 -  时间复杂度

时间复杂度 - 各种数据结构的时间复杂度分析
摘要:参考 https://cloud.tencent.com/developer/ask/112047 https://blog.csdn.net/chao2016/article/details/82425317 详细解析 数组 设置,在特定索引处检查元素:O(1) 搜索:O(n)数组是否未排序,O( 阅读全文

posted @ 2019-12-23 21:48 frank_cui 阅读(3768) 评论(0) 推荐(0) 编辑

时间复杂度 - Convert 计算次数 TO 时间复杂度
摘要:我们假设计算机运行一行基础代码需要执行一次运算。 int aFunc(void) { printf("Hello, World!\n"); // 需要执行 1 次 return 0; // 需要执行 1 次 } 那么上面这个方法需要执行 2 次运算 int aFunc(int n) { for(in 阅读全文

posted @ 2019-02-12 18:01 frank_cui 阅读(2943) 评论(1) 推荐(0) 编辑

< 2025年2月 >
26 27 28 29 30 31 1
2 3 4 5 6 7 8
9 10 11 12 13 14 15
16 17 18 19 20 21 22
23 24 25 26 27 28 1
2 3 4 5 6 7 8

导航

统计

levels of contents
点击右上角即可分享
微信分享提示