This project is a solution for the Hashira Placements coding assignment.
- The program first reads a JSON input file.
- Each root is stored with a
baseand avalue. - The root is converted into a decimal integer using the base information.
- Only the first k roots are selected, because k = m + 1 is sufficient for a polynomial of degree m.
- The polynomial is then constructed by multiplying factors of the form
(x - root). - The program finally prints:
- The polynomial in an expanded, human-readable form.
- The list of coefficients, from constant term to highest power of x.
- HashiraPolynomial.java
- input1.json
- output1.txt
- input2.json
- output2.txt