Subtract Two Linkedlist
1. You are give two single linkedlist of digits.Input Format
2. The most significant digit comes first and each of their nodes contain a single digit. Subtract the two numbers and return it as a linked list.
3. You may assume the two numbers do not contain any leading zero, except the number 0 itself.
4. any list can be larger in term of number.
1->2->3->4->5->6->7->nullOutput Format
7->8->9->null
1->2->3->3->7->7->8->nullQuestion Video
0 <= N <= 10^6Sample Input
6Sample Output
1 8 0 5 4 6
1
1
1 8 0 5 4 5
-
Asked in Companies
-
Related Topics
Video Solution
Code Solution
{ }
{ }
Run