Skip to content

Commit

Permalink
#31 Fix return/param of wrong type.
Browse files Browse the repository at this point in the history
  • Loading branch information
likejazz committed Sep 14, 2020
1 parent 92e1a97 commit 242cd95
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions 3-linear-data-structures/ch08/16-1.py
Original file line number Diff line number Diff line change
Expand Up @@ -20,15 +20,15 @@ def reverseList(self, head: ListNode) -> ListNode:
return prev

# 연결 리스트를 파이썬 리스트로 변환
def toList(self, node: ListNode) -> ListNode:
def toList(self, node: ListNode) -> List:
list: List = []
while node:
list.append(node.val)
node = node.next
return list

# 파이썬 리스트를 연결 리스트로 변환
def toReversedLinkedList(self, result: ListNode) -> ListNode:
def toReversedLinkedList(self, result: str) -> ListNode:
prev: ListNode = None
for r in result:
node = ListNode(r)
Expand Down

0 comments on commit 242cd95

Please sign in to comment.