2 ms·
dynamic programming is usually more efficient. They'll be on the same order, but the constant factor is usually lower. However, if all that matters is that yo
by Psyonic 18y ago
dynamic programming is usually more efficient. They'll be on the same order, but the constant factor is usually lower. However, if all that matters is that you're not getting into exponential territory, memoization should be fine.