Oracle | On Campus Coding Assessment | MinPath
Anonymous User
294

You have a N*N grid consisting of 'S' (Source) , 'D' (Destination) and 'X' (Blocked) values in the indexes. You have to find the minimum distance between any pair of source and destination nodes, keeping in mind that you cannot travel through the X (Blocked) nodes.

Eg: n = 3
S X D
S D D
S X X

ans = 1 unit

Comments (2)