Hacker News new | past | comments | ask | show | jobs | submit login

Well, I've written that a handful of times, but those were back when I was an embarrassingly bad programmer. Nowadays, I just use one of the various library functions to do it -- if you count C++, there are somewhere near half a dozen ways. It's a task I perform a lot, but the libraries have it covered.

The very same is true for "sort a linked-list", though, and that seems to be a popular one. This type of question isn't normally asked because they actually expect you to do it, but because if you don't know some specific things, the question will expose that.




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

Search: