Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

all files formatted successfully #1788

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

Closed

Conversation

Copy link

@karanupd12 karanupd12 commented Aug 9, 2025

Fixes #1783

Description

Added BasicPrefixSum algorithm implementation with comprehensive test suite.

Changes

  • Created PrefixSum/BasicPrefixSum.js with input validation
  • Created PrefixSum/BasicPrefixSum.test.js with edge case coverage
  • Follows all project coding guidelines
  • Fixed code formatting to meet Prettier standards

Testing

Implementation includes tests for:

  • Normal array computation
  • Empty array handling
  • Single element arrays
  • Negative numbers
  • Error cases for invalid inputs

Code Quality

  • ✅ Passes all formatting checks (Prettier)
  • ✅ Follows project coding guidelines
  • ✅ Comprehensive test coverage
  • ✅ Proper input validation and error handling

Copy link

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 85.90%. Comparing base (1d252d7) to head (a92fe31).

Additional details and impacted files
@@ Coverage Diff @@
## master #1788 +/- ##
==========================================
+ Coverage 85.87% 85.90% +0.02% 
==========================================
 Files 377 378 +1 
 Lines 19720 19757 +37 
 Branches 3005 3016 +11 
==========================================
+ Hits 16935 16972 +37 
 Misses 2785 2785 

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copy link
Author

@appgurueu @raklaptudirm

I noticed there's a spelling error in an existing file (not related to my changes), but I've kept my PR focused solely on the BasicPrefixSum implementation to avoid scope creep.

My changes are limited to:

  • PrefixSum/BasicPrefixSum.js
  • PrefixSum/BasicPrefixSum.test.js

The spelling error appears to be in a pre-existing file and is unrelated to the prefix sum algorithm implementation. I can create a separate issue/PR to address that spelling error if needed, but wanted to keep this contribution focused on the specific issue #1783.

Thanks for reviewing! 🙏

@karanupd12 karanupd12 closed this by deleting the head repository Aug 17, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Reviewers

@raklaptudirm raklaptudirm Awaiting requested review from raklaptudirm raklaptudirm is a code owner

@appgurueu appgurueu Awaiting requested review from appgurueu appgurueu is a code owner

Assignees
No one assigned
Labels
None yet
Projects
None yet
Milestone
No milestone
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add Basic Prefix Sum Algorithm with Tests

AltStyle によって変換されたページ (->オリジナル) /