Shopee Interview Question

A dynamic programming leetcode problem