LeetCode 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.
题意
融合两个已经排好序的链表,并返回一个新表。
思路
先找到表头,然后做个循环不断排序下去即可。
代码
C语言版本:
结果:208 / 208 test cases passed.
Status: Accepted
Runtime: 4 ms