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

How objects of a class are created if no constructor is defined in the class?

0 Answers  


How many bytes is a string?

0 Answers  


In Serialization, whether you will use Static variables?

3 Answers   HCL,


What methods are used to get and set the text label displayed by a button object?

0 Answers  


What are design patterns and please explain?

0 Answers  






Is a boolean variable?

0 Answers  


Define how does a try statement determine which catch clause should be used to handle an exception?

0 Answers  


Why do we need data structure in java?

0 Answers  


what is the purpose of class "Object" which is base class for all classes?

3 Answers  


Is a class subclass of itself?

0 Answers  


Can private class be inherited in java?

0 Answers  


What is a parameter in simple terms?

0 Answers  


Categories