Amazon Interview Question

Matrix Question with a list within a list