Skip to content

Conversation

pull[bot]
Copy link

@pull pull bot commented Mar 20, 2025

See Commits and Changes for more details.


Created by pull[bot] (v2.0.0-alpha.1)

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

* Update prefix_sum.py

Index Validation for get_sum

Raises ValueError if start or end is out of range or start > end.
Handles cases where the array is empty.
✅ Empty Array Support

If an empty array is passed, get_sum raises an appropriate error instead of failing unexpectedly.
✅ Optimized contains_sum Initialization

Initializes sums with {0} for efficient subarray sum checking.

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update prefix_sum.py

* Update prefix_sum.py

* [pre-commit.ci] auto fixes from pre-commit.com hooks

for more information, see https://pre-commit.ci

* Update prefix_sum.py

* Update prefix_sum.py

---------

Co-authored-by: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Co-authored-by: Maxim Smolskiy <mithridatus@mail.ru>
@pull pull bot added the ⤵️ pull label Mar 20, 2025
@pull pull bot merged commit 580273e into AlgorithmAndLeetCode:master Mar 20, 2025
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.

1 participant