Skip to content

Commit

Permalink
[Issue 34]fixed bug in merge_sorted_list
Browse files Browse the repository at this point in the history
  • Loading branch information
jerryderry committed Oct 11, 2018
1 parent b1244bb commit be1244e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion python/07_linkedlist/linked_list_algo.py
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit be1244e

Please sign in to comment.