Refactor: merge ReverseStackUsingRecursion into ReverseStack and update tests (#6474)#6480
Refactor: merge ReverseStackUsingRecursion into ReverseStack and update tests (#6474)#6480vickycodebase wants to merge 1 commit intoTheAlgorithms:masterfrom vickycodebase:migrate-reverse-stack
Conversation
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## master #6480 +/- ##
============================================
- Coverage 75.11% 75.09% -0.03%
+ Complexity 5575 5570 -5
============================================
Files 687 686 -1
Lines 19318 19307 -11
Branches 3732 3732
============================================
- Hits 14511 14498 -13
- Misses 4245 4246 +1
- Partials 562 563 +1 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
why did you remove this file? Please revert this deletion.
There was a problem hiding this comment.
Thanks for pointing this out — I’ll restore the file. I had removed it because it seemed duplicate, but I’ll revert the deletion as requested.
There was a problem hiding this comment.
Please solve the linting issues in this file
There was a problem hiding this comment.
Got it — I’ll fix the linting issues and update the PR.
|
Thanks for the review and the detailed feedback! I’ll revert the deleted file, address the linting issues, and double-check the null stack handling. I’ll push the updates tomorrow. |
Deleted ReverseStackUsingRecursion.java and ReverseStackUsingRecursionTest.java.
Moved the recursive stack reversal method into ReverseStack.java.
Updated ReverseStackTest.java to include:
Null stack test using assertThrows for IllegalArgumentException.
Tests for empty, single-element, two-element, and multi-element stacks.
Verification that stack size remains unchanged after reversal.
Ensured all tests follow JUnit 5 conventions and project formatting.