21 Merge Two Sorted Lists(easy)

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.

合并两个排好序的List 采用两个指针记录两个List的下表,比较两个指针对映的元素的大小,小的元素加入最终的List并将指针往前移动,最后注意处理剩余的元素。

 

posted @ 2017-11-21 14:58  WegYcx  阅读(79)  评论(0编辑  收藏  举报