2 Add Two Numbers

来源:互联网 发布:铁路工程概预算软件 编辑:程序博客网 时间:2024/04/29 13:21

2. Add Two Numbers

 My Submissions
Total Accepted: 145515 Total Submissions: 622715 Difficulty: Medium

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

【思路-java】此题考查的是链表


Submission Details

1556 / 1556 test cases passed.
Status: 

Accepted

Runtime: 4 ms
Submitted: 7 minutes ago

0 0
原创粉丝点击