LeetCode 21 Merge Two Sorted Lists 题解
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.
题意:
合并两个有序链表
2.解题思路:
见代码。记得保留头节点。
3.代码
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 |
|