Amazon Interview Question

Write code to reverse a linked list. Solve the problem of finding the shortest path in a maze using breadth-first search.