Beware of bugs in the above code; I have only proved it correct, not tried it.
Science is what we understand well enough to explain to a computer, Art is all the rest
Premature optimization is the root of all evil
quoted in Kernighan and Pine, The Unix Programming Environment
If you think you're a really good programmer... read [Knuth's] Art of Computer Programming... You should definitely send me a resume if you can read the whole thing.
[a quote by Bill Gates on the jacket of the third edition of The Art of Computer Programming]
The book Dynamic Programming by Richard Bellman is an important, pioneering work in which a group of problems is collected together at the end of some chapters under the heading "Exercises and Research Problems," with extremely trivial questions appearing in the midst of deep, unsolved problems. It is rumored that someone once asked Dr. Bellman how to tell the exercises apart from the research problems, and he replied: "If you can solve it, it is an exercise; otherwise it's a research problem."
The Art of Computer Programming
The URL of this page is: