Solving Classic Maze Problem
Classic Maze!!!!! Classic Maze! is a standard problem. What we have to do is ' Find a Path '. How?? we'll see. Generally, in Maze input is given in the form of 0 and 1, 0 denoting the accessible path whereas 1 denotes "Hurdles" in our path. The Question is- Which approach should we take? any guesses, huh!! Well!! We should Follow Recursive approach . Confused Why? Okay, So now Question is what lead to Recursion?? Think about it in this way >>> We need to find a Path that means we need to connect zeros from start to end. Simple!, So all we need to do is check our array and trace a path. Yes! we need to trace a path. Whenever word " Tracing " comes it is more likely to be related to recursion. Let's Talk about Recursion. Recursion has recursive equation and base cases . Think Of , What Our Base Cases Will be?? >> Our End!!, right. but here we have other cases too... What they Can be??