[Issue 34]fixed bug in merge_sorted_list

This commit is contained in:
Wenru Dong 2018-10-11 17:28:20 +01:00
parent b1244bb9de
commit be1244ea46

View File

@ -55,7 +55,7 @@ def merge_sorted_list(l1: Node, l2: Node) -> Optional[Node]:
current = current._next
current._next = p1 if p1 else p2
return fake_head._next
return p1 or p2
return l1 or l2
# Remove nth node from the end
# 删除倒数第n个节点。假设n大于0