Hacker News new | ask | show | jobs
by johnc1231 2418 days ago
Yeah, I think the above poster said O(logn) space because that's the size of the line count in bits
1 comments

The usual computation model includes "log n sized words", so it really is O (1). You usually are implicitly using that model, otherwise any algorithm that used pointers would have an extra log n tacked on, e.g. linked lists append would be log n not constant.