Google DeepMind Interview | Fresher SWE | CTC - $150K-$200K | DSA Question
Question asked in the DSA interview was based on a story but it boils down to :-
Given a grid of size N*M , some cells are blocked marked with number "4" ; some cells are allowed to visit marked with number "0"/"1"/"2"/"3"
In 1 move you can go from cell (x1,y1) to (x2,y2) if both these cells are adjacent to each other(up/down/left/right)
But there is a different rule -> you are allowed to visit a particular cell multiple times and if you are visiting that cell for the first time only in that case the cost of 1 move is added to your answer
Find the shortest possible path which starts from cell with value "2" and ends in the cell with value "3" - but this shortest path should visit cell with value "1" in the midway or else the path will not be considered valid.


