Adding two polynomials using Linked List - GeeksforGeeks
Adding two polynomials using Linked List Given two polynomial numbers represented by a linked list. Write a function that add these lists means add the coefficients who have same variable powers. Example: Input: 1st number = 5x^2 + 4x^1 + 2x^0 2nd number = 5x^1 + 5x^0 Output: 5x^2 + 9x^1 + 7x^0 Input: 1st number = 5x^3 + 4x^2 + 2x^0 2nd number = 5x^1 + 5x^0 Output: 5x^3 + 4x^2 + 5x^1 + 7x^0 // C++ program for addition of two polynomials // using Linked Lists #includeRead full article from Adding two polynomials using Linked List - GeeksforGeeks
No comments:
Post a Comment