Meta Interview Question

A simple Dynamic P problem