Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
Joe-Z
on June 18, 2017
|
parent
|
context
|
favorite
| on:
If companies interviewed translators the way they ...
It's an average. Sometimes you insert at 0, sometimes at 1, sometimes at 2, ... sometimes at n. On average it's O(n).
chaosite
on June 18, 2017
|
next
[–]
In this case it's the worst-case performance.
poikniok
on June 18, 2017
|
prev
[–]
Who said you insert at different locations?
abalashov
on June 18, 2017
|
parent
[–]
Nobody. But who said you insert at the head? And who said the whole thing is list-backed? Insert is just insert--not a lot to work with there.
Performance complexity is spoken to general cases and averages unless indicated otherwise.
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search: