登录
  • #打卡战拖

求助‌‌‍‍‌‍‍‌‍‌‍‍‌‍‍‍‍‌‍‌‍‌‌‌‍‍‌‌‍‍‌‍Maze Problem

一亩三分地匿名9ED
54
0
An m by n board is given and a mouse wants to go from cell (0,0) to cell (m-1,n-1).

There are some void cells on which the mouse cannot walk. You need to implement

an algorithm that finds the shortest path that the mouse can take to go from cell

(0,0) to cell (m-1,n-1) without walking on void cells. You are given two integers m

and n which determine the dimension of your table two integer arrays containing

the x and y indices of void cells.

Black cells are void and red cells show the path from (0,0) to (m-1,n-1).

图片在附件里

Inputs are: m=5, n=5, xarrray={1,4}, yarray={1,0}
0条回复
热度排序

发表回复