The task was to find the shortest path between x1,y1 and x2,y2 in a maze. You can move horizontally and vertically, where 1 is a wall and 0 is free space. output is k shortest steps to move from the start point to end point.
解法1:BFS
典型的BFS题目,用一个queue来解决。同时标记每一个已经visit过的元素的parent