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

when there is a need of jvm then how we can say that java is a platform independent language?

3 Answers  


What is the use of Getters and Setters method ?

4 Answers  


Why destructor is not used in java?

0 Answers  


what is object slice?

2 Answers   HTC, TCS,


What is compareto?

0 Answers  






What are the parts of methodology?

0 Answers  


How applets will communicate with each other?

1 Answers  


What are the steps that are followed when two computers connect through tcp?

0 Answers  


What is the purpose of the finally clause of a try-catch-finally statement in java programming?

0 Answers  


Difference between overloading and Overriding. <Giving a confusing example to test the concept.> (also asked in PA Consultancy Group,iflex,Value chain,IBM,CTS,Accenture, Tarang>

12 Answers   Accenture, CTS, Extensio, IBM, iFlex, PA Consulting, Symphony, Tarang,


solve (x-1)(x-9)=8;

3 Answers   IBM, Manhattan, TCS,


Why pass by reference is not possible in java?

0 Answers  


Categories