Hacker News new | ask | show | jobs
by thomasz 5113 days ago
> Your code iterated more than once.

Uh... no.

*edit The first element is iterated three times, the second two times and the rest once, making it O(n).