Pergunta de entrevista da empresa TikTok

two Dynamic programming question and one easy array question.