Uber | Onsite | Matrix Walking Problem
2617
Oct 15, 2018
Aug 08, 2019

In a Binary maze with 0 and 1, 0 is the valid cell to which we can travel and 1 means that the cell is blocked. Given source and destination. We have to find-

  1. IF path exists, if yes, find shortest path.
  2. If we are given a chance to toggle single cell from 1 to 0 , which cell you will toggle so that you will surely get the shortest path.
    How to tackle the second part without toggling each cell.
    Is there a better way to do the same?
Comments (2)