21. Merge Two Sorted Lists
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
题意:
合并两个排序链表为一个链表,合并后链表是有序链表。
思路:
1 | struct ListNode |
Java Code:
1 | /** |
Merge two sorted linked lists and return it as a new list. The new list should be made by splicing together the nodes of the first two lists.
合并两个排序链表为一个链表,合并后链表是有序链表。
1 | struct ListNode |
1 | /** |