1774. Add Two Polynomials Represented as Linked Lists

Medium
Linked List
Math
Two Pointers

Description

Hints

Hint 1
Process both linked lists at the same time
Hint 2
If the current power of the two heads is equal, add this power with the sum of the coefficients to the answer list.
Hint 3
If one head has a larger power, add this power to the answer list and move only this head.

Statistics

Acceptance
60.9%
Submissions
26,716
Accepted
16,278