Amazon Interview Question

Write a program that avoids “walls” in an nxn grid (marked with X)