|
|
|
|
|
by antirez
5132 days ago
|
|
that reminds me why I don't like Python. Ad-hoc tools (many) instead of a few general concepts working well together. Btw at interview time this solution would not be acceptable, because you are using still a built-in language construct for looping. |
|
Rather than asking the interview candidate to use recursion for a problem that shouldn't be solved using recursion (unless in a language where recursion is the idiomatic iteration method), it would be better to ask about a problem that is best solved using recursion rather than printing "Hello world" -- perhaps something from Project Euler (http://projecteuler.net/).