Intuit interview question

Dynamic programming using one dimensional array