polynomial addition using linked list in java
Here's my implementation of a addition of two polynomials using a linked List. For example if I want to add 3x^2+5^x+3 and 4x^3+5x+2 first I check if there are similar exponents in the two polynomials and if so I add their coefficients and I append the exponents to a string. After adding similar exponents then using the string I add the remaining parts in both polynomials to the final result. public class Node2{ int coef; int exp; Node2 next; Node2(int c,int e,Node2 n){ coef=c; exp=e; next=n; } Node2(int c,int e){ coef=c; exp=e; } } public class LinkedPoly{ static String exponent=""; Node2