Question 2

Given a binary matrix of 0 and 1 where we can move in 4 directions left, right, top, down and we can only pass through 1’s. Find the shortest path from given source coordinate (a,b) to destination (m,n) given we can flip any one of the zero to one.

[advanced_iframe securitykey=”undefined” src=”https://code.kodnest.com/” width=”100%” height=”600″]

×