s19-09 Dynamic programming 2