Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
leereeves
on Feb 21, 2017
|
parent
|
context
|
favorite
| on:
Ruby `reject!`
You're not saving the O(N) time copy, just replacing it with an O(N) slide.
(That's assuming you copy at all, instead of simply updating the reference.)
brandonbloom
on Feb 22, 2017
[–]
I meant O(N) space, as you said "That would still require O(n) space" - but a slide does not require additional space.
Consider applying for YC's Summer 2026 batch! Applications are open till May 4
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
(That's assuming you copy at all, instead of simply updating the reference.)