算法分析mit英文.pptxVIP

  • 6
  • 0
  • 约小于1千字
  • 约 21页
  • 2022-04-07 发布于上海
  • 举报
1;第1页/共21页;;Since O-notation describes an upper bound, when we use it to bound the worst-case running time of an algorithm, we have a bound on the running time of the algorithm on every input. Thus, the O(n2) bound on worst-case running time of insertion sort also applies to its running time on every input. The Θ(n2) bound on the worst-case running time of insertion sort, however, does not imply a Θ(n2) bound on the running time of insertion sort on every input.For example, we saw in Chapter 2 that when the input is already sorted, insertion sort runs in Θ(n) time.;第4页/共21页;第5页/共21页;第6页/共21页;

文档评论(0)

1亿VIP精品文档

相关文档