TikTok interview question

Q: Dynamic programming and array leetcode questions.