Skip to content

Commit a64cd9d

Browse files
committed
fixed typo
1 parent 43c2a03 commit a64cd9d

2 files changed

Lines changed: 10 additions & 10 deletions

File tree

linked_list/two_lists_sum.md

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,4 @@
1-
# Two Lists Sum <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i>
2-
3-
tags: linked list, recursion, iteration
1+
# Two Lists Sum <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star-half-o"></i>
42

53
## Source
64

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,29 +1,31 @@
1-
# Two Lists Sum Advanced <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star-half-o"></i>
2-
3-
tags: linked list, recursion, iteration
1+
# Two Lists Sum Advanced <i class="fa fa-star"></i><i class="fa fa-star"></i><i class="fa fa-star"></i>
42

53
## Source
64

7-
- GeeksforGeeks - [Add two numbers represented by linked lists | Set 2 - GeeksforGeeks](http://www.geeksforgeeks.org/sum-of-two-linked-lists/)
5+
- CC150 - [Add two numbers represented by linked lists | Set 2 - GeeksforGeeks](http://www.geeksforgeeks.org/sum-of-two-linked-lists/)
86

97
```
108
Given two numbers represented by two linked lists, write a function that returns sum list.
119
The sum list is linked list representation of addition of two input numbers.
12-
It is not allowed to modify the lists.
1310
1411
Example
1512
1613
Input:
17-
First List: 5->6->3 // represents number 563
18-
Second List: 8->4->2 // represents number 842
14+
First List: 5->6->3 // represents number 563
15+
Second List: 8->4->2 // represents number 842
1916
Output
2017
Resultant list: 1->4->0->5 // represents number 1405
2118
2219
Challenge
2320
21+
Not allowed to modify the lists.
2422
Not allowed to use explicit extra space.
2523
```
2624

25+
### 题解1 - 反转链表
26+
27+
在题 [Two Lists Sum | Data Structure and Algorithm](http://algorithm.yuanbin.me/linked_list/two_lists_sum.html) 的基础上改了下数位的表示方式,前者低位在前,高位在后,这个题的高位在前,低位在后。很自然地可以联想到先将链表反转,而后再使用 Two Lists Sum 的解法。
28+
2729
## Reference
2830

2931
- [Add two numbers represented by linked lists | Set 2 - GeeksforGeeks](http://www.geeksforgeeks.org/sum-of-two-linked-lists/)

0 commit comments

Comments
 (0)