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

chore(CPlusPlus): add rat in a maze problem #1051

Merged
merged 3 commits into from
Nov 30, 2022

Conversation

yashh1234
Copy link
Contributor

A backtracking algorithm attempts to build a solution to a computational problem incrementally, one small piece at a time. Whenever the algorithm needs to decide between several alternatives to the next component of the solution, it recursively evaluates each alternative and then chooses the best one.

Rat in a Maze problem statement C++
You receive an N*N maze with a rat placed in maze [0] [0]. Using the C++ programming language, find and print all the paths that rat can follow to reach its destination, that is the maze [N-1] [N-1]. The rat can move in any direction (left, right, up and down). The value of each cell in the maze can be 0 or 1. Cells with value 0 are blocked means rat cannot enter those cells and those with value 1 are open.

PR Checklist:

  • My submission is formatted according to the guidelines in the contributing guide
  • My addition is on refer on the language README.md file
  • My addition does not have a spelling problem
  • My submission has a proper and user-friendly description of the algorithm
  • My submission has the time complexity of the algorithm
  • My submission has sample input-output of the program (NOT FOR PYTHON)

What kind of change does this PR introduce? (check at least one)

  • Bugfix
  • New algorithm
  • Optimization in previous algorithms
  • Code style update
  • Refactor
  • Documentation
  • Other, please describe:

Briefly describe the changes in this PR

Other information:

A backtracking algorithm attempts to build a solution to a computational problem incrementally, one small piece at a time. Whenever the algorithm needs to decide between several alternatives to the next component of the solution, it recursively evaluates each alternative and then chooses the best one.

Rat in a Maze problem statement C++
You receive an N*N maze with a rat placed in maze [0] [0]. Using the C++ programming language, find and print all the paths that rat can follow to reach its destination, that is the maze [N-1] [N-1]. The rat can move in any direction (left, right, up and down). The value of each cell in the maze can be 0 or 1. Cells with value 0 are blocked means rat cannot enter those cells and those with value 1 are open.
@ming-tsai ming-tsai changed the title Create rat-in-a-maze-problem.cpp chore(CPlusPlus): add rat in a maze problem Oct 25, 2022
@ming-tsai ming-tsai requested a review from aayushjainx October 25, 2022 00:59
@ming-tsai ming-tsai added the C++ language used is C++ label Oct 25, 2022
@yashh1234
Copy link
Contributor Author

@aayushjain7 please review, all checks have passed.

@ming-tsai ming-tsai requested review from Arsenic-ATG and removed request for aayushjainx November 21, 2022 21:48
Copy link
Member

@Arsenic-ATG Arsenic-ATG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code look fine to me.
just update the corresponding index readme.md file with it and the PR should be good to go.

@yashh1234
Copy link
Contributor Author

Made the changes in the readme file. @Arsenic-ATG @ming-tsai

Copy link
Contributor Author

@yashh1234 yashh1234 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Edited the corresponding readme.md file @Arsenic-ATG @ming-tsai

Copy link
Member

@Arsenic-ATG Arsenic-ATG left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I can't seem to find any additional commit after 7be1145 which updates any README.md.

Are you sure you updated correct branch of your fork ?

@yashh1234
Copy link
Contributor Author

@Arsenic-ATG i'm having a problem here, i haven't done this before, where do i have to go and do those readme changes. I edited the readme and opened a different pull request on that one. I'm confused.

@Arsenic-ATG
Copy link
Member

@Arsenic-ATG i'm having a problem here, i haven't done this before, where do i have to go and do those readme changes. I edited the readme and opened a different pull request on that one. I'm confused.

the PR is linked to "patch-3" branch of your fork, just update the readme in that branch and changes would automatically be reelected back on this PR

@yashh1234
Copy link
Contributor Author

@Arsenic-ATG i'm having a problem here, i haven't done this before, where do i have to go and do those readme changes. I edited the readme and opened a different pull request on that one. I'm confused.

the PR is linked to "patch-3" branch of your fork, just update the readme in that branch and changes would automatically be reelected back on this PR

Hii, i have updated the readme from patch 3 of my fork, please check @Arsenic-ATG

@Arsenic-ATG Arsenic-ATG mentioned this pull request Nov 27, 2022
13 tasks
@yashh1234
Copy link
Contributor Author

@Arsenic-ATG the checks have passed, do i close the pull request to see the changes?

@Arsenic-ATG
Copy link
Member

@Arsenic-ATG the checks have passed, do i close the pull request to see the changes?

no need, the check have passed and a reviewer have approved it, it should soon be merged to the main repository by ming-tsai after which this PR would automatically be closed.

generally they merge the PRs within 24 hours after it is accepted but judging from the recent activity, they seem quite busy so I thing it might take a bit more time but you don't have to worry anymore, rest of the process would be handled by repository maintainers.

@yashh1234
Copy link
Contributor Author

yashh1234 commented Nov 27, 2022

@Arsenic-ATG the checks have passed, do i close the pull request to see the changes?

no need, the check have passed and a reviewer have approved it, it should soon be merged to the main repository by ming-tsai after which this PR would automatically be closed.

generally they merge the PRs within 24 hours after it is accepted but judging from the recent activity, they seem quite busy so I thing it might take a bit more time but you don't have to worry anymore, rest of the process would be handled by repository maintainers.

Got it thanks for the help and guidance, this was my first time contributing so i was very confused.

@ming-tsai ming-tsai merged commit 7aa0b7b into MakeContributions:main Nov 30, 2022
@welcome
Copy link

welcome bot commented Nov 30, 2022

Congrats on merging your first pull request! We here at MakeContributions are proud of you! 🎉🎉🎉🎉.
You are invited to join the team on Github and Discord.

@yashh1234 yashh1234 deleted the patch-3 branch November 30, 2022 13:50
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
C++ language used is C++
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants