3 ms·
If you set n=2^140, then sure, it’s constant. If instead you only have n<=2^140, then n varies across a large set and is practically indistinguishable from n<=i
by thrw2486776 2y ago
If you set n=2^140, then sure, it’s constant. If instead you only have n<=2^140, then n varies across a large set and is practically indistinguishable from n<=infinity (since we get into the territory of the number of atoms in the universe), therefore you can perform limit calculations on it, in particular big O stuff.
In the article n was set to 5. All of those arrays (except maybe 1) have exactly 5 elements. There is no variance (and even if there was, it would be tiny, there is no point in talking about limits of 5-element sequences).
- someplaceguy 2y ago> In the article n was set to 5. All of those arrays (except maybe 1) have exactly 5 elements. There is no variance No, the code was: # If there are < 5 items, just return the median if len(l) < 5: return nlogn_median(l) > and even if there was, it would be tiny, there is no point in talking about limits of 5-element sequences So your point is: not all constants are created equal. Which circles all the way back to my original point that this argument is pretty funny :)