Skip to content

Commit f93ae6c

Browse files
committed
fix : 타입 일관성 유지, ListNode 생성 시 None 대신 기본값 사용
1 parent 08cfbf7 commit f93ae6c

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

merge-two-sorted-lists/devyejin.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ def __init__(self, val=0, next=None):
99
time : O(m+n)
1010
space : O(1)
1111
"""
12-
12+
from typing import Optional
1313

1414
class Solution:
1515
def mergeTwoLists(self, list1: Optional[ListNode], list2: Optional[ListNode]) -> Optional[ListNode]:
16-
dummy = ListNode(None)
16+
dummy = ListNode()
1717

1818
node = dummy
1919

0 commit comments

Comments
 (0)