Repository navigation
Implemented Easy Prefix Sum Solutions (Issue #12) - #20
Conversation
|
PR Template is not followed. Kindly follow the template & edit it again for consideration as a valid pull request. Thanks for contributing in OpenCode'25 ✨✨! Correct Tempelate: |
There was a problem hiding this comment.
Pull request overview
This PR adds two C++ solutions for prefix sum problems as part of Issue #12: Running Sum of 1d Array (LeetCode 1480) and Range Sum Query - Immutable (LeetCode 303). Both implementations use the prefix sum technique to efficiently compute cumulative sums.
Key Changes:
- Added RunningSum1dArray.cpp implementing a running sum calculator using prefix sum approach
- Added RangeSumQueryImmutable.cpp implementing a range sum query class with O(1) query time
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 5 comments.
| File | Description |
|---|---|
| RunningSum1dArray.cpp | Implements running sum using prefix sum technique with O(N) time complexity |
| RangeSumQueryImmutable.cpp | Implements range sum queries using precomputed prefix sum array with O(1) query time |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Apologies for the oversight. I have updated the PR description to strictly follow the required template format. |
|
Thanks for opening this PR 🚀. Mentor will review your pull request soon and till then, keep contributing and stay calm. Thanks for contributing in OpenCode'25 ✨✨! |
|
Your PR has been merged 🥳🥳 and you have earned 20 points. Thanks for contributing in OpenCode'25✨✨ |
Added details to contributors.md
Issue : #12
Added solutions for Range Sum Query - Immutable and Running Sum of 1d Array