Basic examples of dynamic programming in Java Seven standard coding challenges all implemented using a dynamic programming approach All these examples use a recursive approach that stores previously calculated values in a HashMap so that time and space complexity gets reduced.