Meta Interview Question

Dynammic programming question