Programmatically obtaining Big-O efficiency of code

后端 未结 18 1344

I wonder whether there is any automatic way of determining (at least roughly) the Big-O time complexity of a given function?

If I graphed an O(n) function vs. an O(n

18条回答
  •  误落风尘
    2020-11-27 16:33

    Jeffrey L Whitledge is correct. A simple reduction from the halting problem proves that this is undecidable...

    ALSO, if I could write this program, I'd use it to solve P vs NP, and have $1million... B-)

提交回复
热议问题