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

Functionality of JVM?

7 Answers   Infosys,


what is the output??????? public class multireturn { public(int assign x ( int x) { if(4==x) { return 7; } else if (7=x+3) { return 6; } return 5; } }

3 Answers   TCS,


When we should use serialization?

1 Answers  


What is not thread safe?

1 Answers  


Write a program to solve producer consumer problem in java?

1 Answers  


What is final keyword in java? Give an example.

1 Answers  


What is java lang string?

1 Answers  


How do you generate random numbers in java?

1 Answers  


What are the two categories of data types in the java programming language?

1 Answers  


What do you mean by the term transient?

5 Answers   Ericsson,


Define canvas?

1 Answers  


Why should I use abstract class?

1 Answers  


Categories