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

If it's fairly easy, then I think it still fits the spirit of the rules. KISS and all.

On the other hand, the idea that one might be setting traps is slightly weird... if you _know_ 90% that n will be large then pick an algorithm that's efficient (and since it's easy to implement, it's a win-win). If n is always going to be small, then does the choice really matter?



If N is known small you should favor simplicity and readability over complex optimization.




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

Search: