Update merge_two_lists.py

This commit is contained in:
marina 2023-08-07 15:48:48 -07:00 committed by GitHub
parent 8d8b3f7e53
commit 3024f285e5
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3,13 +3,13 @@
# author: bt3gl # author: bt3gl
class ListNode: class Node:
def __init__(self, val=0, next=None): def __init__(self, val=0, next=None):
self.val = val self.val = val
self.next = next self.next = next
def merge_two_list(list1: Optional[ListNode], list2: Optional[ListNode]) -> Optional[ListNode]: def merge_two_list(list1: Optional[Node], list2: Optional[Node]) -> Optional[Node]:
if not list1: if not list1:
return list2 return list2