Write a java program to find the route that connects
between Red and Green Cells.












General Rules for traversal
1. You can traverse from one cell to another
vertically, horizontally or diagonally.
2. You cannot traverse through Black cells.
3. There should be only one Red and Green cell and at
least one of each should be present. Otherwise the array is
invalid.
4. You cannot revisit a cell that you have already
traversed.
5. The maze need not be in the same as given in the
above example


No Answer is Posted For this Question
Be the First to Post Answer

Post New Answer

More Core Java Interview Questions

What restrictions are placed on method overloading and method overriding?

5 Answers  


take an array with -ve and +ve value both.find out the nearest value of 0(zero).if two values are same like(-2 and +2)then extract +2 is nearest of 0(zero).

0 Answers  


Hi Friends, can u give me Real Time example for interface and abstract class.(With Banking Example)

4 Answers  


What is the difference between Byte stream and Charecter Stream?

2 Answers   Tarang Software,


What is run time allocation?

0 Answers   Fidelity,






Explain the scope of a variable.

0 Answers   TCS,


How do you print array in java?

0 Answers  


What is enhanced loop in java?

0 Answers  


Can we extend singleton class in java?

0 Answers  


Is 0 an even number?

0 Answers  


What is the meaning of find and replace?

0 Answers  


Why singleton pattern is better than creating singleton class with static instance?

0 Answers  


Categories