Amazon Interview Question

One easy graph search problem and one easy matrix problem.