Answered step by step
Verified Expert Solution
Question
1 Approved Answer
Given a n * n grid where each cell has one of three values : 0 represents an empty cell 1 represents there is a
Given a nn grid where each cell has one of three values : represents an empty cell represents there is a cheese in the cell represents there is a rat in the cell. Now the rat has a special ability that he can clone himself four times and go upwardi j righti j downi j lefti j The rat will only go to the given directions if a cheese is in there in the cell he can go all for directions and eat in second. Find the minimum time he needs to eat all Cheese available in the grid. If it is impossible to eat all the cheese then return
Given a nn grid where each cell has one of three values :
represents an empty cell
represents there is a cheese in the cell
represents there is a rat in the cell.
Now the rat has a special ability that he can clone himself four times and go upwardi j righti j downi j lefti j The rat will only go to the given directions if a cheese is in there in the cell he can go all for directions and eat in second.
Find the minimum time he needs to eat all Cheese available in the grid.
If it is impossible to eat all the cheese then return
Step by Step Solution
There are 3 Steps involved in it
Step: 1
Get Instant Access to Expert-Tailored Solutions
See step-by-step solutions with expert insights and AI powered tools for academic success
Step: 2
Step: 3
Ace Your Homework with AI
Get the answers you need in no time with our AI-driven, step-by-step assistance
Get Started