Skip to content

Conversation

@githubpradyumn
Copy link

🚀 Added Stack using Queue Implementation (Java)

Description:
Implemented the Stack data structure using two Queues in Java with detailed comments, algorithm explanation, and test cases.

Features:

  • Clean and documented Java code.
  • Proper error handling and underflow checks.
  • Includes test cases in the main() method.
  • Algorithm and complexity analysis added.

Complexity:

  • Push → O(n)
  • Pop → O(1)
  • Top → O(1)
  • Space → O(n)

File Added: StackUsingQueue.java

Author: Pradyumn Pratap Singh (Strange)
For: Hacktoberfest / Open Source Contribution 🎉

@codecov-commenter
Copy link

Codecov Report

❌ Patch coverage is 0% with 33 lines in your changes missing coverage. Please review.
✅ Project coverage is 76.48%. Comparing base (c691b31) to head (f55fa22).

Files with missing lines Patch % Lines
...orithms/datastructures/stacks/StackUsingQueue.java 0.00% 33 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6721      +/-   ##
============================================
- Coverage     76.60%   76.48%   -0.13%     
  Complexity     6026     6026              
============================================
  Files           719      720       +1     
  Lines         20326    20359      +33     
  Branches       3937     3940       +3     
============================================
  Hits          15571    15571              
- Misses         4164     4197      +33     
  Partials        591      591              

☔ 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
Member

@githubpradyumn Thank you for your contribution, but a stack implementation is not considered as an algorithm. Therefore this PR will not be accepted

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