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

If you are running a sort them you will need to compare each of the elements at least once which will mean you have to evaluate the whole list right?


You have to evaluate the whole input list (absent cheating by checking if you have enough elements equal to minBound), but you don't have to sort more elements than you need to produce, which can save you work.




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

Search: