leet code 002:Add Two Numbers ???未完成

来源:互联网 发布:acl访问控制列表 端口 编辑:程序博客网 时间:2024/05/16 06:52

题目描述:

You are given two linked lists representing two non-negative numbers. The digits are stored in reverse order and each of their nodes contain a single digit. Add the two numbers and return it as a linked list.

Input: (2 -> 4 -> 3) + (5 -> 6 -> 4)
Output: 7 -> 0 -> 8

题目大意:

给定两个链表分别代表两个非负整数。数位以倒序存储,并且每一个节点包含一位数字。将两个数字相加并以链表形式返回。

解题思路:

题目

Python代码:


原创粉丝点击