Microsoft interview question

Dynamic programming, linked list