I have Java function as input and want to get it's order for example O( n ) I search in the internet very hard but didn't find any thing can help me, is there any algorithms or package may help me.
Asked
Active
Viewed 386 times
1 Answers
5
No. There's no algorithm to analyze the asymptotic complexity of a piece of code given as input. Being able to do that would tell you whether the code halted and that's undecidable.
David Richerby
- 82,470
- 26
- 145
- 239