Surescripts Interview Question

Dynamic programming question, string array parse question