Skip to content
This repository has been archived by the owner on Oct 4, 2024. It is now read-only.

Proposal : Adding an implementation of the Rat in a Maze Problem in C++. #223

Open
AbhijitMotekar99 opened this issue Oct 2, 2024 · 2 comments

Comments

@AbhijitMotekar99
Copy link

Consider a rat placed at (0, 0) in a square matrix of order N * N. It has to reach the destination at (N - 1, N - 1). Find all possible paths that the rat can take to reach from source to destination. The directions in which the rat can move are 'U'(up), 'D'(down), 'L' (left), 'R' (right). Value 0 at a cell in the matrix represents that it is blocked and the rat cannot move to it while value 1 at a cell in the matrix represents that rat can travel through it.

What I’d Like to Do:

  • Implement the algorithm to find all possible paths for the rat to traverse from the start point to the destination in a maze represented as a 2D grid.
  • Provide a method to display the paths taken by the rat.
  • Write test cases to verify the implementation and ensure all edge cases are covered.
@AnshDwivedi03
Copy link
Contributor

Can you assign it to me @AbhijitMotekar99

@AnshDwivedi03
Copy link
Contributor

I have done necessary changes and added logic and code kindly merge my pr @DevAffan

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants