Do you use Big-O complexity evaluation in the 'real world'?

后端 未结 11 1522
失恋的感觉
失恋的感觉 2021-01-01 18:53

Recently in an interview I was asked several questions related to the Big-O of various algorithms that came up in the course of the technical questions. I don\'t think I di

11条回答
  •  庸人自扰
    2021-01-01 19:26

    The answer from my personal experience is - No. Probably the reason is that I use only simple, well understood algorithms and data structures. Their complexity analysis is already done and published, decades ago. Why we should avoid fancy algorithms is better explained by Rob Pike here. In short, a practitioner almost never have to invent new algorithms and as a consequence almost never have to use Big-O.

    Well that doesn't mean that you should not be proficient in Big-O. A project might demand the design and analysis of an altogether new algorithm. For some real-world examples, please read the "war stories" in Skiena's The Algorithm Design Manual.

提交回复
热议问题