When does one typically prefer the little
我理解了大O和小O之间的区别,但是我想知道什么时候/为什么在特定情况下(和相反)选择小O在大O上。
You can chose to describe an algorithm or requirement using little-o notation when you want to emphasize the difference from big O, or if you want to ensure "something is better than..."
A naive example - if you need a 3rd party to create some library for you, and you want to ensure the query time is sublinear, the mathematical notation for sublinear will be o(n)
, where o(.)
is the little o notation.
上一篇: 渐近分析“o”到“O”的转换
下一篇: 什么时候一个人通常喜欢那么一点