Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> You know this would mean that a change to a vector under 32 elements is O(n) right?

Technically true, but only because a change to a vector of under 32 elements is O(1) by definition (as long as the algorithm is deterministic) and O(n) includes O(1). It's equally true that a change to a vector of under 32 elements is O(n!).

The notation you're using is not meaningful in the context of bounded input. Big-O notation is not concerned with any behavior except the behavior at infinity.



This is not generally the case. Practically speaking, big O notation is almost always bounded. The clojure vector implementation has a maximum count of 2^32, therefore the behaviour at infinity is O(SomeException)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: