Frage im Vorstellungsgespräch bei Rafael

Matrix chain multiplication question, first naive recursive solution, then dynamic programming.