Skip to content

[pull] master from TheAlgorithms:master #44

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

Merged
merged 3 commits into from
Sep 1, 2024

Conversation

pull[bot]
Copy link

@pull pull bot commented Sep 1, 2024

See Commits and Changes for more details.


Created by pull[bot]

Can you help keep this open source service alive? 💖 Please sponsor : )

Yancey2023 and others added 3 commits September 1, 2024 09:47
* fix: KMP algorithm (#2712)

* feat: let the KMP algorithm return index and add more tests.

* feat: format code

* Update strings/knuth_morris_pratt.cpp

* update knuth_morris_pratt.cpp

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
* ref: rework on stack array data structure
- 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

* chore(docs): add `namespace` docstring

* chore: add `std::out_of_range` exception and test cases when stack is empty

* ref: add `full` and `empty` methods

* ref: improve stack array implementation
- Use TOS instead of stack index
- Add tests for overflow and underflow

* fix: remove comparision to true from asserts

* chore: remove `stack.hpp`

* fix: revert

* Update data_structures/stack_using_array.cpp

* docs: add namespace comment

* chore: remove redundant line in docstring of `empty` method

---------

Co-authored-by: realstealthninja <68815218+realstealthninja@users.noreply.github.com>
@pull pull bot added the ⤵️ pull label Sep 1, 2024
@pull pull bot merged commit 54a20b4 into AlgorithmAndLeetCode:master Sep 1, 2024
4 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants