adds exam 2-3 subsequence iterative dynamic programming