Adobe Interview Question

One Dynamic programming question , Zigzag traversal of matrices