编程:关于程序的时间复杂度
2014-04-12 11:19
274 查看
2014.4.12
参考材料:Data Structures, Algorithms and Applications in C++
2.3 Time Complexity
1: 对于估计时间复杂度来说,有比较精细的计算方法,这时我们要知道" the time needed for an arithmetic operation depends on the type(int, lfoat, doule, etc.)"
另外两种估计的方法,一是" Identify one or more key operations and determine the number of times these are performed ";一是" determine the total number of strps executed by the program. "
2: 对于通过估计某个操作的运行次数来估计时间复杂度这种方法,选择不同的操作估计的时间复杂度可能都不一样,关键在于你选择的操作运行时间是不是贡献了程序主要时间。
3: " The average operation count is often quite difficult to determine. As a result, in some applications, we limit our analysis to determining the best and worst counts. "
参考材料:Data Structures, Algorithms and Applications in C++
2.3 Time Complexity
1: 对于估计时间复杂度来说,有比较精细的计算方法,这时我们要知道" the time needed for an arithmetic operation depends on the type(int, lfoat, doule, etc.)"
另外两种估计的方法,一是" Identify one or more key operations and determine the number of times these are performed ";一是" determine the total number of strps executed by the program. "
2: 对于通过估计某个操作的运行次数来估计时间复杂度这种方法,选择不同的操作估计的时间复杂度可能都不一样,关键在于你选择的操作运行时间是不是贡献了程序主要时间。
3: " The average operation count is often quite difficult to determine. As a result, in some applications, we limit our analysis to determining the best and worst counts. "
相关文章推荐
- 关于程序代码的时间复杂度
- 关于程序的运算时间复杂度的一点思考
- 编程之美-程序理解和时间分析
- C语言编程 计算程序运行时间 精确到微秒
- 对于一颗完全二叉树,要求给所有节点加上一个pNext指针,指向同一层的相邻节点;如果当前节点已经是该层的最后一个节点,则将pNext指针指向NULL;给出程序实现,并分析时间复杂度和空间复杂度。
- 关于map与set的count的时间复杂度(个人观点,不正确请指出)
- 编程之美-程序理解和时间分析
- 读书笔记之编程之美 - 2.20 程序理解和时间分析
- 编程之美----2.20 程序理解和时间分析
- 编程之美之程序理解和时间分析
- 关于算法的时间复杂度O(f(n))
- 正在学习关于sniffer的编程,收集到的资料(有经过修正程序)
- 对于一颗完全二叉树,要求给所有节点加上一个pNext指针,指向同一层的相邻节点;如果当前节点已经是该层的最后一个节点,则将pNext指针指向NULL;给出程序实现,并分析时间复杂度和空间复杂度。
- 关于程序运行时间的求取方法(精确到微妙)
- 五分钟或更短时间熟悉SQLite--关于SQLite编程的快速简介
- 编程前,关于时间的想法2
- 编程之美-程序理解和时间分析
- 【程序人生】:一篇关于编程思想的体会
- Unix网络编程:关于编译并测试TCP时间获取的客户程序
- 黑马程序员-关于java编程的书写程序的规范