Amazon Interview Question

Two LP, one very easy list-like coding problem.