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

Rework on Stack Array Data Structure #2683

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

TruongNhanNguyen
Copy link

@TruongNhanNguyen TruongNhanNguyen commented Mar 18, 2024

What I have done in this PR:

  • Reorganize code in data_structure namespace and Stack class
  • The destructor is added to the Stack class to ensure memory deallocation
  • Comments are added to the member functions to describe their purpose
  • The self-test function is provided, which demonstrates the usage of the Stack class and its methods.

Description of Change

Checklist

  • Added description of change
  • Added file name matches File name guidelines
  • Added tests and example, test must pass
  • Added documentation so that the program is self-explanatory and educational - Doxygen guidelines
  • Relevant documentation/comments is changed or added
  • PR title follows semantic commit guidelines
  • Search previous suggestions before making a new one, as yours may be a duplicate.
  • I acknowledge that all my contributions will be made under the project's license.

Notes:

- The `Stack` class is placed within the `data_structures` namespace
- The destructor is added to the Stack class to ensure memory deallocation
- Comments are added to the member functions to describe their purpose
- The self-test function is provided, which demonstrates the usage of the Stack class
@TruongNhanNguyen
Copy link
Author

Please take a look on this PR @realstealthninja, @Panquesito7

Copy link
Contributor

This pull request has been automatically marked as abandoned because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contributions.

@github-actions github-actions bot added the stale Author has not responded to the comments for over 2 weeks label Apr 19, 2024
@TruongNhanNguyen
Copy link
Author

Could you have a look on this PR @realstealthninja

Copy link

@mrmagic2020 mrmagic2020 left a comment

Choose a reason for hiding this comment

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

Both maintainers of this repo are rather busy these days, so I'll do a quick review.
Very solid rework and documentation. Have you considered adding methods like empty() and full()? They might help client code to handle these cases before operations like pop() and push().
Overall I think this is merge-worthy. Up to the maintainers to make further decision :)

@TruongNhanNguyen
Copy link
Author

TruongNhanNguyen commented Apr 30, 2024

Can you add don't-close label for this PR, @mrmagic2020?

@mrmagic2020
Copy link

mrmagic2020 commented Apr 30, 2024

Can you add don't-close label for this PR, @mrmagic2020?

Sorry, I don't have write access to this repo... you still need to wait for the maintainers

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
stale Author has not responded to the comments for over 2 weeks
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants