Skip to content
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

βœ… fix: πŸ› Two-stack Queue completed #1716

Merged
merged 2 commits into from
Nov 2, 2024

Conversation

yashksaini-coder
Copy link
Contributor

πŸ“₯ Pull Request

Description

This pull request adds a comprehensive guide to implementing a queue using two stacks with a lazy transfer approach. The key changes include the algorithm overview, implementation details, usage example, complexity analysis, and a flowchart for better understanding.

Documentation and Implementation:

  • Added a new markdown file docs/Queue/Two-Stack-Queue.md that includes a detailed guide on implementing a two-stack queue with explanations of key operations and their complexities.
  • Provided a complete C implementation of the two-stack queue, including stack operations and queue operations such as enqueue, dequeue, and isQueueEmpty.
  • Included a usage example in C to demonstrate the functionality of the two-stack queue.
  • Added a flowchart to visualize the enqueue and dequeue operations and the transfer process between stacks.

image

βœ… Fixes #1663

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Copy link

github-actions bot commented Nov 1, 2024

Thank you for submitting your pull request! πŸ™Œ We'll review it as soon as possible.). If there are any specific instructions or feedback regarding your PR, we'll provide them here. Thanks again for your contribution! 😊

@yashksaini-coder
Copy link
Contributor Author

@ajay-dhangar can you review this PR, and assign it to me with proper labels too

Copy link

github-actions bot commented Nov 1, 2024

⚑️ Lighthouse Report for the Deploy Preview of this PR πŸš€

πŸ”— Site: Algo | Live Site

URL 🌐 Performance Accessibility Best Practices SEO πŸ“Š
/algo/ 🟑 64 🟒 96 🟑 75 🟑 86 πŸ“„
/algo/docs 🟑 51 🟒 96 🟑 75 🟒 100 πŸ“„
/algo/blog 🟑 67 🟒 92 🟒 96 🟑 86 πŸ“„

@ajay-dhangar ajay-dhangar added gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. level1 GirlScript Summer of Code | Contributor's Levels labels Nov 2, 2024
Copy link
Owner

@ajay-dhangar ajay-dhangar left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Done

@ajay-dhangar ajay-dhangar merged commit 7457214 into ajay-dhangar:main Nov 2, 2024
5 checks passed
Copy link

github-actions bot commented Nov 2, 2024

πŸŽ‰πŸŽ‰ Thank you for your contribution! Your PR #1716 has been merged! πŸŽ‰πŸŽ‰

@yashksaini-coder yashksaini-coder deleted the yash/fix-1663 branch November 2, 2024 11:01
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gssoc-ext Contributions made as part of GirlScript Summer of Code Extended Edition. level1 GirlScript Summer of Code | Contributor's Levels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[Idea]: Two-Stack Enqueue and Dequeue (Lazy Transfer)
2 participants