Skip to content

feat: add ReverseStringUsingStack (#6451) #6454

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

Conversation

Dhirajgiri18
Copy link

This PR adds an implementation for reversing a string using a stack, as requested in #6451 . The algorithm pushes each character of the input string onto a stack and then pops them to construct the reversed string. The code includes detailed comments and proper resource management by closing the Scanner.

@codecov-commenter
Copy link

codecov-commenter commented Jul 31, 2025

Codecov Report

❌ Patch coverage is 0% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 75.00%. Comparing base (24f4090) to head (815c24f).

Files with missing lines Patch % Lines
...thealgorithms/strings/ReverseStringUsingStack.java 0.00% 9 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6454      +/-   ##
============================================
- Coverage     75.04%   75.00%   -0.05%     
  Complexity     5534     5534              
============================================
  Files           685      686       +1     
  Lines         19208    19217       +9     
  Branches       3706     3708       +2     
============================================
- Hits          14414    14413       -1     
- Misses         4239     4249      +10     
  Partials        555      555              

☔ View full report in Codecov by Sentry.
📢 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.

@DenizAltunkapan
Copy link
Collaborator

@Dhirajgiri18 Already exists, i'm sorry. Please find another way to contribute 💯

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.

3 participants