and-semakin / codewars_path_finder

Solution for "Path Finder #2: shortest path" kata

Home Page:https://www.codewars.com/kata/57658bfa28ed87ecfa00058a/train/python

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Path Finder #2: shortest path

Open on CodeWars

You are at position [0, 0] in maze NxN and you can only move in one of the four cardinal directions (i.e. North, East, South, West). Return the minimal number of steps to exit position [N-1, N-1] if it is possible to reach the exit from the starting position. Otherwise, return false in JavaScript/Python and -1 in C++/C#/Java.

Empty positions are marked .. Walls are marked W. Start and exit positions are guaranteed to be empty in all test cases.

About

Solution for "Path Finder #2: shortest path" kata

https://www.codewars.com/kata/57658bfa28ed87ecfa00058a/train/python


Languages

Language:Python 100.0%