大O,您如何计算/近似?

我怕爱的太早我们不能终老 提交于 2020-08-13 13:40:34

问题:

Most people with a degree in CS will certainly know what Big O stands for . 大多数拥有CS学位的人肯定会知道Big O代表什么。 It helps us to measure how (in)efficient an algorithm really is and if you know in what category the problem you are trying to solve lays in you can figure out if it is still possible to squeeze out that little extra performance. 它可以帮助我们评估算法的效率(效率),如果您知道要解决的问题属于哪一类,则可以判断出是否仍有可能榨取少量的额外性能。 1 1个

But I'm curious, how do you calculate or approximate the complexity of your algorithms? 但是我很好奇, 如何计算或估算算法的复杂性?

1but as they say, don't overdo it, premature optimization is the root of all evil , and optimization without a justified cause should deserve that name as well. 1,但是正如他们所说,不要过度使用, 过早的优化是万恶之源 ,而没有正当理由的优化也应该得到这个名字。


解决方案:

参考一: https://stackoom.com/question/qV/大O-您如何计算-近似
参考二: https://oldbug.net/q/qV/Big-O-how-do-you-calculate-approximate-it
标签
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!