Skip to content

Fix maze recursion boundaries - #7722

Closed
CaioSavoldi wants to merge 3 commits into
TheAlgorithms:masterfrom
CaioSavoldi:fix/maze-recursion-boundaries
Closed

CaioSavoldi wants to merge 3 commits into
TheAlgorithms:masterfrom
CaioSavoldi:fix/maze-recursion-boundaries

Conversation

@CaioSavoldi

Copy link
Copy Markdown

Summary

  • Fixes array boundary issues in maze recursion.
  • Allows custom starting and destination positions.
  • Validates invalid and empty maze inputs.
  • Refactors both strategies to share recursive solving logic.

Tests

  • Added tests for small mazes, null and empty inputs, invalid coordinates, and custom start/destination positions.
  • Existing maze strategy tests continue to pass.

@codecov-commenter

codecov-commenter commented Nov 1, 2026 •

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 59.37500% with 13 lines in your changes missing coverage. Please review.
✅ Project coverage is 82.23%. Comparing base (410f087) to head (96034ab).

Files with missing lines Patch % Lines
.../com/thealgorithms/backtracking/MazeRecursion.java 59.37% 5 Missing and 8 partials ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7722      +/-   ##
============================================
+ Coverage     82.22%   82.23%   +0.01%     
- Complexity     8402     8410       +8     
============================================
  Files           843      843              
  Lines         26143    26141       -2     
  Branches       5101     5099       -2     
============================================
+ Hits          21495    21498       +3     
+ Misses         3854     3847       -7     
- Partials        794      796       +2     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@CaioSavoldi CaioSavoldi closed this Nov 1, 2026
@CaioSavoldi
CaioSavoldi deleted the fix/maze-recursion-boundaries branch November 1, 2026 13:06
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants