Given the head of a non empty singly linked list representing a non negative integer, increment the integer by head of the updated linked list.
The most significant digit is located at the head of the list, and each node contains a single digit.
Constraints:
The number of nodes in the linked list is in the range
Node.val
The number represented by the linked list does not contain leading zeros except for the zero itself.
Given the head of a non empty singly linked list representing a non negative integer, increment the integer by head of the updated linked list.
The most significant digit is located at the head of the list, and each node contains a single digit.
Constraints:
The number of nodes in the linked list is in the range
Node.val
The number represented by the linked list does not contain leading zeros except for the zero itself.