Rubrik Interview Question

Question related to dynamic programming