Subtract Two Numbers Represented by Forward-Order Linked Lists

Given two non-empty singly linked lists l1 and l2, each representing a non-negative integer with the most significant digit first, compute l1 - l2 and return the result in the same forward digit...

Example

Unlock to view complete problem details

and practice with sample input/output

Was this article helpful?

View Test Cases & Run Code requires membership

Standard Input
Execution Result: