Amazon | Phone screen | Shortest path an a grid & Max value in min heap
Anonymous User
1298

Location: Seattle

  1. Given a warehouse find the shortest path between source and destination (example path quoated in red)
{{ 0 , 1 , 0 , 1 , 0 },
 {"1", 0 , 1 , 1 , 1 },
 {"1", 0 , 1 , 0 , 1 },
 {"1","1","1", 0 , 1 },
 { 0 , 0 ,"1", 0 , 1},
 { 1 , 0, "1","1","1"}}
Source: {1, 0}
Destination: {5, 4}
Solution: 9
  1. find the maximum value in min heap
Comments (3)