Wednesday, September 17, 2014

Merge Two Sorted Lists

Problem

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.

Idea

弄个新指针,然后把l1和l2中最小的节点挂在新指针后面

Solution


No comments:

Post a Comment