Skip to content

#4358 Fix : Floodfill infinite recursion due to same color #4359

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Sep 9, 2023

Conversation

Manan-09
Copy link
Contributor

@Manan-09 Manan-09 commented Sep 9, 2023

  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.

Fixed #4358
Fixed case when both newColor and oldColor is passed as same integer causing infinite recursion by adding extra base condition.
Also added testcase for same and after that ran all testcase, which resulted as all passed.

Screenshot 2023-09-09 at 6 04 36 PM

@Manan-09 Manan-09 changed the title Fix : Floodfill infinite recursion due to same color #4358 Fix : Floodfill infinite recursion due to same color Sep 9, 2023
@Manan-09 Manan-09 force-pushed the #4358 branch 2 times, most recently from dd33754 to 0af9c13 Compare September 9, 2023 12:44
@Manan-09 Manan-09 changed the title #4358 Fix : Floodfill infinite recursion due to same color 4358 Fix : Floodfill infinite recursion due to same color Sep 9, 2023
@Manan-09 Manan-09 changed the title 4358 Fix : Floodfill infinite recursion due to same color #4358 Fix : Floodfill infinite recursion due to same color Sep 9, 2023
Copy link
Member

@vil02 vil02 left a comment

Choose a reason for hiding this comment

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

Looks good.

There are few changes changes in the remaining pieces of this file, but I cannot suggest them here. I will make a suitable PR afterward.

@vil02 vil02 merged commit a88abb7 into TheAlgorithms:master Sep 9, 2023
@vil02 vil02 mentioned this pull request Sep 9, 2023
5 tasks
@Manan-09
Copy link
Contributor Author

Manan-09 commented Sep 9, 2023

Thanks @vil02 ,
This was my first open source contribution 😃

@vil02
Copy link
Member

vil02 commented Sep 9, 2023

@Manan-09 this was my first merge as a maintainer of this repository! Enjoy further contributing!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants