IBM Interview Question

DP, Linked list questions from leetcode