Skip to content

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

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

karanupd12
Copy link

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

@codecov-commenter
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.

@karanupd12
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! 🙏

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

[FEATURE]: Add Basic Prefix Sum Algorithm with Tests
2 participants