/Rat-in-a-maze

Rat in a maze app using React and MaterialUI

Primary LanguageJavaScriptMIT LicenseMIT

Rat in a Maze

RatMazeApp CI

This web app brings to life the rat in a maze problem. It visualizes all the possible paths a rat can take in a 2d-maze with fixed obstacles.

There is a given maze of size N x N. The source and the destination location is top-left cell and bottom right cell respectively. Some cells are valid to move and some cells are blocked. The rat can take only one step to the right or down at a time. If the rat starts moving from start vertex to destination vertex, we have to find if the rat can reach the destination, if it is possible then the correct paths for the rat are marked.

💻 Development Environment

Setup your development environment as follows:

  1. Install project dependencies:

    cd Rat-in-a-Maze
    npm install
    
  2. Run the app in the development mode:

    npm start
    
  3. In case it fails in latest node, you can switch to node version 14 using nvm

     nvm use v14.17.6
    

    Open http://localhost:3000 to view it in the browser. The page will reload if you make edits.

Use for references

Use this Rat-in-a-Maze app as a references material only.