3 ms·Simple BFS from the starting position should do the trick.by posed 4y agoSimple BFS from the starting position should do the trick.