HN
Hacker News
Top
New
Best
Ask
Show
Jobs
Comment by zeroonetwothree | Hacker News Reader
Parent
Full thread
zeroonetwothree
·
Every solution is at least O(n).
View on HN
TheRealNGenius
·
Wrong, calculating n(n-1)/2 is O(1)
gberger
·
Finding the length of the array is O(n), though.
cobalt
·
depends on how its referenced I suppose
Reply on news.ycombinator.com