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

No, I think it is a terrible example at so many levels it is not even funny. The only interesting thing about that example is how almost any other solution is much better.

I would consider quicksort to be a quite simple example if you use a high level language. But search in binary search tree and similar tree/graph traversal are maybe better examples, in the sense that most people would find recursion to be more natural than any iterative solution.



Consider applying for YC's Summer 2026 batch! Applications are open till May 4

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

Search: