Re:Why I Don’t Talk to Google Recruiters
by stcredzero on Tuesday February 21, 2017 @05:06PM
(#13700510)
to be even more precise :)
Or, you should demonstrate the self awareness to realize that you're just playing with the ambiguity of English in a hastily written comment. Exercise: in what precise context would time/space complexity be O(n), and in what precise context would it be O(1)? (Though the emoticon is probably an indicator that you already knew all this.)
Re:Why I Don’t Talk to Google Recruiters
by lorenzhs on Wednesday February 22, 2017 @03:18AM
(#13704038)
I'm well aware how to analyze a dynamically growing array (each insert "pays" for two moves in the future), but I'm not sure what you're getting at. The amortized complexity of appending an element to the end is θ(1), worst-case non-amortized θ(n) when the growing needs to happen.
Re:Why I Don’t Talk to Google Recruiters
by stcredzero on Wednesday February 22, 2017 @04:28PM
(#13709316)
Then do that N times. Then re-read the text and think of the context being discussed.
Not to be overly nit-picky here, and technically O(n) is correct as well (it's also the un-amortized worst case of insertion), but you probably meant to say that the amortized time is O(1), or θ(1) to be even more precise :)