Missing the main part of the dynamic programming technique