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

Which Java operator is right associative?

3 Answers  


When can an object reference be cast to an interface reference in java programming?

0 Answers  


If an application has multiple classes in it, is it okay to have a main method in more than one class?

0 Answers  


What is methods and methodology?

0 Answers  


How do you escape a string?

0 Answers  


Is array a class in java?

0 Answers  


What is collections framework?

0 Answers  


How much ram can a 64 bit processor theoretically?

0 Answers  


I have a sorting issue with a Hashmap. My constraint is that I MUST use the Hashmap and work with existing code. I do a database query and place the results in a Hashmap. When I iterate thru the Hashmap, it loses the original alphabetical sorting done by the database. So, my problem is that I must sort the results coming out of the Hashmap which is then placed into another class.

1 Answers  


What is an array length?

0 Answers  


What access modifiers can be used for class ?

0 Answers  


How many days will it take to learn java?

0 Answers  


Categories