Rooms 01

Room cleaning

A Jeroo starts at the north end of a flower covered hallway with 4 flowers in its pouch. It must traverse the hallway(no need to pick any flowers) and find the 4 rectangular rooms that connect to the hallway and disable the net in each room.

There are 4 different room configurations: Rooms01,Rooms02,Rooms03, Rooms04

?  
Rooms 02 Rooms03 Rooms04  

 

Write an efficient program that will work for any island to search each room and disable the net in each room.