21/03/2026, 23:34 Add Two Numbers - LeetCode
Please verify your email to unlock all features and services on LeetCode.
Problem List Submit 0 Premium
Description Editorial Solutions Submissions Code
Python3 Auto
2. Add Two Numbers 1 # Definition for singly-linked l
2 # class ListNode:
Medium Topics Companies 3 # def __init__(self, val=0,
4 # [Link] = val
You are given two non-empty linked lists representing two non-negative integers. The digits are stored in 5 # [Link] = next
reverse order, and each of their nodes contains a single digit. Add the two numbers and return the sum as a 6 class Solution:
linked list. 7 def addTwoNumbers(self, l1:
[ListNode]:
You may assume the two numbers do not contain any leading zero, except the number 0 itself. 8
Example 1:
Saved
[Link] 1/1