Skip to content

Conversation

@Priyanshu1303d
Copy link
Contributor

@Priyanshu1303d Priyanshu1303d commented Oct 31, 2025

Hello! This PR adds a new physics algorithm, Coulomb's Law (CoulombsLaw.java), to the physics module.
This utility class is the electrostatic equivalent of the Gravitation algorithm.


  • I have read CONTRIBUTING.md.
  • This pull request is all my own work -- I have not plagiarized it.
  • All filenames are in PascalCase.
  • All functions and variable names follow Java naming conventions.
  • All new algorithms have a URL in their comments that points to Wikipedia or other similar explanations.
  • All new code is formatted with clang-format -i --style=file src\main\java\com\thealgorithms\physics\CoulombsLaw.java

This returns all calculated values in a single, convenient Result object. I have run the tests locally, and all cases pass successfully.

@codecov-commenter
Copy link

codecov-commenter commented Oct 31, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.34%. Comparing base (bf8cc61) to head (f2b7a53).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #7017      +/-   ##
============================================
+ Coverage     78.33%   78.34%   +0.01%     
- Complexity     6616     6621       +5     
============================================
  Files           746      747       +1     
  Lines         22022    22036      +14     
  Branches       4321     4322       +1     
============================================
+ Hits          17250    17264      +14     
  Misses         4085     4085              
  Partials        687      687              

☔ 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.

@Priyanshu1303d
Copy link
Contributor Author

Hello @alxkm, @DenizAltunkapan, @yanglbme,

I was running the full mvn test suite to verify my changes, I discovered a pre-existing bug in JugglerSequence.java that was causing the build to fail.

this commit includes both my new CoulombsLaw feature and the fix for JugglerSequence.java. All tests now pass locally with a BUILD SUCCESS. ✅

Thanks for your time!

@DenizAltunkapan DenizAltunkapan enabled auto-merge (squash) November 1, 2025 09:25
@DenizAltunkapan DenizAltunkapan merged commit 0837424 into TheAlgorithms:master Nov 1, 2025
6 checks passed
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.

3 participants