+ 3

Is this a valid way to calculate algorithmic costs empirically?

https://code.sololearn.com/cs829Mdr2WnH/?ref=app

18th Nov 2018, 12:57 AM
AntonioJFN
AntonioJFN - avatar
2 Answers
+ 3
It's a good start for studying growth, but just using two data points can be misleading. The big-oh notation is for asymptotic complexity. For example, 1000n^2 is bigger than 0.001n^3 until n is less than a million, even though the first is quadratic and the second cubic. I don't know what's a standard empirical test for measuring complexity. But some sort of curve-fitting might work.
19th Nov 2018, 3:13 AM
Kishalaya Saha
Kishalaya Saha - avatar
+ 3
thanks
22nd Sep 2020, 9:41 AM
AntonioJFN
AntonioJFN - avatar