dummy) and set dummy.next to the head of the list.curr to the first node and lastNonZero to dummy.sum to 0.curr is not null.
a. If curr.val is not zero, add curr.val to sum.
b. If curr.val is zero, set lastNonZero.next.val to sum, link lastNonZero.next to curr, update lastNonZero to curr, and reset sum to 0.curr to the next node.dummy.next as the new head of the modified list.