Similar to https://leetcode.com/problems/plus-one/, but digits are expressed in linked list instead of array.

Given a non-negative number represented as a singly linked list of digits, plus one to the number.

The digits are stored such that the most significant digit is at the head of the list.

Example:

Input:

1->2->3

Output:

1->2->4

Have to do it in O(n) time and O(1) space.