Example 1

Example 2

The number of nodes in the list is in the range [1, 104]0 <= Node.val <= 9The input is generated such that the list represents a number that does not have leading zeros, except the number 0 itself.Example 1

Example 2

The number of nodes in the list is in the range [1, 104]0 <= Node.val <= 9The input is generated such that the list represents a number that does not have leading zeros, except the number 0 itself.