Shopee interview question

Asked me to code a dynamic programming problem