Skip to content

matt-atadata/Maze-Grid-Search

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 

Repository files navigation

HackerRank Maze Grid Search in Python

Input Format
The first line of the input is N (<100), the size of the board (NxN). The second line of the input contains two space separated integers, which is the position of the bot. Grid is indexed using Matrix Convention. The position of the princess is indicated by the character 'p' and the position of the bot is indicated by the character 'm' and each cell is denoted by '-' (ascii value: 45).

Output Format
Output only the next move you take to rescue the princess. Valid moves are LEFT, RIGHT, UP or DOWN

Sample Input

5
2 3
-----
-----
p--m-
-----
-----

Sample First Output

LEFT

Resultant State

-----
-----
p-m--
-----
-----

About

HackerRank Maze Grid Search in Python

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages