Amazon Interview Question

Recursion to iterate a grid