News for hackers. Stuff that matters.
Re:Lessons from a Silicon Valley job search by aboveandbeyond on Wednesday March 19, 2014 @12:41PM (#7429886)
It's actually O(1). It's (N * (N+1))/2
Re:Lessons from a Silicon Valley job search by gregors on Wednesday March 19, 2014 @12:54PM (#7430030)
that's what I said "constant time"
Re:Lessons from a Silicon Valley job search by Terr_ on Wednesday March 19, 2014 @02:42PM (#7430794)
Your post is missing some required punctuation which would've made that easier to see.
Re:Lessons from a Silicon Valley job search by randomthought on Wednesday March 19, 2014 @07:07PM (#7432503)
what about (n(n+1)/2)< 1000 n^2 ? .
Re:Lessons from a Silicon Valley job search by thedufer on Thursday March 20, 2014 @12:03AM (#7433785)
He interpreted it as "the time complexity of computing the sum of the numbers from 1 to n", which using the formula you just gave takes O(1) time.