官术网_书友最值得收藏!

Asymptotic analysis

There are essentially three things that characterize an algorithm's runtime performance. They are:

  • Worst case - Use an input that gives the slowest performance
  • Best case - Use an input that give, the best results
  • Average case - Assumes the input is random

To calculate each of these, we need to know the upper and lower bounds. We have seen a way to represent an algorithm's runtime using mathematical expressions, essentially adding and multiplying operations. To use asymptotic analyses, we simply create two expressions, one each for the best and worst cases.

主站蜘蛛池模板: 乐陵市| 沈阳市| 嘉峪关市| 仙居县| 永安市| 大宁县| 德令哈市| 惠州市| 西峡县| 云霄县| 特克斯县| 景东| 罗江县| 黄冈市| 沈丘县| 博野县| 台山市| 颍上县| 长兴县| 威远县| 昭苏县| 建瓯市| 凤冈县| 和林格尔县| 新津县| 武山县| 乌什县| 香港| 江阴市| 尖扎县| 萍乡市| 凤山市| 江西省| 兴安县| 陵川县| 镶黄旗| 托克托县| 彝良县| 府谷县| 德兴市| 正蓝旗|