</pre>题目描述</h2><div class="subject-question" style="font-size:14px; line-height:1.6; margin-bottom:20px; color:rgb(51,51,51); font-family:arial,STHeiti,"Microsoft YaHei",宋体"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; line-height:1.4em">有两个用链表表示的整数,每个结点包含一个数位。这些数位是反向存放的,也就是个位排在链表的首部。编写函数对这两个整数求和,并用链表形式返回结果。</p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; line-height:1.4em">给定两个链表ListNode* <span style="color:rgb(0,0,0)">A</span>,ListNode* <span style="color:rgb(0,0,0)">B</span>,请返回A+B的结果(ListNode*)。</p><div class=
</pre>题目描述</h2><div class="subject-question" style="font-size:14px; line-height:1.6; margin-bottom:20px; color:rgb(51,51,51); font-family:arial,STHeiti,"Microsoft YaHei",宋体"><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; line-height:1.4em">有两个用链表表示的整数,每个结点包含一个数位。这些数位是反向存放的,也就是个位排在链表的首部。编写函数对这两个整数求和,并用链表形式返回结果。</p><p style="margin-top:0px; margin-bottom:0px; padding-top:0px; padding-bottom:0px; line-height:1.4em">给定两个链表ListNode* <span style="color:rgb(0,0,0)">A</span>,ListNode* <span style="color:rgb(0,0,0)">B</span>,请返回A+B的结果(ListNode*)。</p><div class=