Question d’entretien chez TikTok

I got a dynamic programming question.