Pergunta de entrevista da empresa TikTok

A Leetcode dynamic programming question