Domanda di colloquio di TikTok

two Dynamic programming question and one easy array question.