4 kyu
Simple maze
777 of 1,043eugene-katsevman
Description:
Kate constantly finds herself in some kind of a maze. Help her to find a way out!.
For a given maze and Kate's position find if there is a way out. Your function should return True or False.
Each maze is defined as a list of strings, where each char stays for a single maze "cell". ' ' (space) can be stepped on, '#' means wall and 'k' stays for Kate's starting position. Note that the maze may not always be square or even rectangular.
Kate can move left, up, right or down only.
There should be only one Kate in a maze. In any other case you have to throw an exception.
Example input
['# ##',
'# k#',
'####']
Example output
True
Example input
['####'.
'# k#',
'####']
Example output
False
Queues
Recursion
Algorithms
Similar Kata:
Stats:
Created | Feb 10, 2016 |
Published | Feb 10, 2016 |
Warriors Trained | 4335 |
Total Skips | 1331 |
Total Code Submissions | 9911 |
Total Times Completed | 1043 |
Python Completions | 777 |
Java Completions | 276 |
Total Stars | 160 |
% of votes with a positive feedback rating | 96% of 242 |
Total "Very Satisfied" Votes | 225 |
Total "Somewhat Satisfied" Votes | 16 |
Total "Not Satisfied" Votes | 1 |
Total Rank Assessments | 6 |
Average Assessed Rank | 4 kyu |
Highest Assessed Rank | 4 kyu |
Lowest Assessed Rank | 6 kyu |