Skip to content

Conversation

@Keykyrios
Copy link
Contributor

Description

This pull request adds Neville's algorithm, a method for polynomial interpolation. Given a set of points, it efficiently calculates the value of the interpolating polynomial at a specified x-coordinate.

Algorithm Explanation

  • What is Neville's Algorithm? Neville's algorithm is an iterative method to find the value of a polynomial passing through n+1 given points. It builds up the solution by considering polynomials of increasing degrees.
  • Wikipedia: https://en.wikipedia.org/wiki/Neville's_algorithm

Implementation Details

  • Created Neville.java in the com.thealgorithms.maths package.
  • Implemented a static interpolate method to perform the calculation.
  • Added comprehensive JUnit tests in NevilleTest.java to verify correctness with linear, quadratic, and negative-valued functions. Tests for edge cases like empty or mismatched input arrays are also included.

  • 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 path/to/your/file.java

@codecov-commenter
Copy link

codecov-commenter commented Oct 19, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 78.29%. Comparing base (14a0de4) to head (88d0827).

Additional details and impacted files
@@             Coverage Diff              @@
##             master    #6842      +/-   ##
============================================
+ Coverage     78.28%   78.29%   +0.01%     
- Complexity     6574     6580       +6     
============================================
  Files           743      744       +1     
  Lines         21895    21910      +15     
  Branches       4288     4293       +5     
============================================
+ Hits          17140    17154      +14     
  Misses         4073     4073              
- Partials        682      683       +1     

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

Copy link
Member

@DenizAltunkapan DenizAltunkapan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @Keykyrios

@DenizAltunkapan DenizAltunkapan enabled auto-merge (squash) October 28, 2025 10:12
@DenizAltunkapan DenizAltunkapan merged commit 3c70a54 into TheAlgorithms:master Oct 28, 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