Skip to content

Commit 2cd3262

Browse files
committed
02python
1 parent 6c9ac28 commit 2cd3262

File tree

1 file changed

+7
-4
lines changed

1 file changed

+7
-4
lines changed

solution/0000-0099/0002.Add Two Numbers/Solution.py

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,11 @@
11
# Definition for singly-linked list.
2-
# class ListNode:
3-
# def __init__(self, val=0, next=None):
4-
# self.val = val
5-
# self.next = next
2+
from typing import Optional
3+
4+
5+
class ListNode:
6+
def __init__(self, val=0, next=None):
7+
self.val = val
8+
self.next = next
69
class Solution:
710
def addTwoNumbers(
811
self, l1: Optional[ListNode], l2: Optional[ListNode]

0 commit comments

Comments
 (0)