Skip to content

Input Format The first line contains 2 space separated integers which is the position of the PacMan. The second line contains 2 space separated integers which is the position of the food. The third line of the input contains 2 space separated integers. Indicating the size of the rows and columns respectively. This is followed by row (r) lines ea…

Notifications You must be signed in to change notification settings

kunalsinx/Graph-Search-Algorithms

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Graph-Search-Algorithms

INPUT FORMAT :-

The first line contains 2 space separated integers which is the position of the PacMan.

The second line contains 2 space separated integers which is the position of the food.

The third line of the input contains 2 space separated integers. Indicating the size of the rows and columns respectively. This is followed by row (r) lines each containing column (c) characters. A wall is represented by the character '%' while empty spaces which can be used for movement is represented by the character '-'.

The top left of the grid is indexed (0,0) and the bottom right of the grid is indexed (r-1,c-1)

OUTPUT FORMAT

It prints the shortest path between the source 'P' and the destination '.' followed by Lenght of the path

About

Input Format The first line contains 2 space separated integers which is the position of the PacMan. The second line contains 2 space separated integers which is the position of the food. The third line of the input contains 2 space separated integers. Indicating the size of the rows and columns respectively. This is followed by row (r) lines ea…

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages