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 is one third plus one third as a fraction?

0 Answers  


Is java se free?

0 Answers  


Can we have return statement in finally clause? What will happen?

0 Answers  


How we can generate random numbers in java?

0 Answers  


Why is a singleton bad?

0 Answers  






can we declare private class in java file?

13 Answers  


what is the reason behind non static method cannot be referenced from a static Context?

2 Answers  


Which of the following can be referenced by a variable? A. The instance variables of a class only B. The methods of a class only C. The instance variables and methods of a class

2 Answers  


as we know a static method could access static data and static method only. then how could main method call the object of aclass which is not static and other non static data

1 Answers  


What is difference between hashset and hashmap in java?

0 Answers  


What is Runtime class and its purpose?

2 Answers  


What are voids?

0 Answers  


Categories