What is the big deal about Big-O notation in computer science?

前端 未结 14 615
广开言路
广开言路 2021-01-31 11:30

How would Big-O notation help in my day-to-day C# programming? Is it just an academic exercise?

14条回答
  •  春和景丽
    2021-01-31 11:46

    This is a question that (Almost) everyone asks during their CS studies, especially if they plan to be industrial developers.

    As everyone here indicated, yes, it's critical. Although you might be able to evade it, or never care about performance, at some point you're going to be affected by it. At some point you will have to manipulate a lot of data in memory, and you will have to find a way to do it efficiently. You will have to choose between existing collections in some cases, and in others will have to design your own.

    That being said, I have found that some schools push too much the mathematical/algebraic side to their undergraduates over the importance for real world use. Students who are less interested in this algebraic side develop a distaste. IMHO, there is no need for most CS students to know how to calculate Big O beyond the basics. Forcing things like the Masters theorem down their throat is not going to make them appreciate this.

提交回复
热议问题