This puzzle can be solved using the following concepts. Practice using these concepts and improve your skills.
Thanks to your help, Detective Pikaptcha was able to get a sense of where he was trapped: a space-warp maze! Pikaptcha knows well that a space-warp maze has no visible exit; he must find his own way.
“Time to test a good old trick and see what happens: follow a wall and keep a count for each cell of how many times I stepped into it.”Your objective is to write a program that will compute, for each cell of a maze, the number of times Pikaptcha will step into the cell by following a wall until he reaches his original location.
>: facing right
v: facing down
<: facing left
^: facing up
Rfor the wall on his right
Lfor the wall on his left
We’re considering the
Allotted response time to output is ≤
5 3 >000# #0#00 00#0# L
1322# #2#31 12#1#
A higher resolution is required to access the IDE