Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

That is true, but one generally doesn't care about the best case. It's a good point though.

(Also, if data is a linked-list, length() could be an O(n) operation. That would make this O(n^3) or O(n^4) ;))



Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: