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

You do not need to sort for the preprocessing based solution, you only need a K-way partition, which if I'm not mistaken, it can be done in two linear passes. I don't remember if it can be done in place easily though.


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

Search: