TheAlgorithms / JavaScript

Algorithms and Data Structures implemented in JavaScript for beginners, following best practices.
https://the-algorithms.com/language/javascript
GNU General Public License v3.0
31.77k stars 5.44k forks source link

refactor: reduce code duplication in `FloodFill` #1645

Closed vil02 closed 3 months ago

vil02 commented 3 months ago

Open in Gitpod know more

Describe your change:

This PR reduced the code duplication and adds missing tests.

Checklist:

codecov-commenter commented 3 months ago

Codecov Report

All modified and coverable lines are covered by tests :white_check_mark:

Project coverage is 84.08%. Comparing base (bd34e9f) to head (1be1853).

Additional details and impacted files ```diff @@ Coverage Diff @@ ## master #1645 +/- ## ========================================== + Coverage 84.07% 84.08% +0.01% ========================================== Files 375 375 Lines 19688 19685 -3 Branches 2913 2917 +4 ========================================== + Hits 16552 16553 +1 + Misses 3136 3132 -4 ```

:umbrella: View full report in Codecov by Sentry.
:loudspeaker: Have feedback on the report? Share it here.

vil02 commented 3 months ago

@appgurueu thanks for 1be1853dd012718ec3b139ea3d1c48e29312fcdf.