Initial commit: Just stating the problem, describing a solution design, and implementing it without any optimization (except memoization)
Optimization: use commutativity to Do Less Work
Minor nearly totally cosmetic code change