Intuit interview question

dp, linked list etc