Pergunta de entrevista da empresa xAI

Dynamic programming-based sum of integers in an array.