0% found this document useful (0 votes)
3 views1 page

Add Two Numbers - LeetCode

The document describes the LeetCode problem 'Add Two Numbers', which involves adding two non-empty linked lists that represent non-negative integers stored in reverse order. The task is to return the sum as a linked list. It includes a brief overview of the problem and a reference to the solution structure in Python.

Uploaded by

astutikumari2.0
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
3 views1 page

Add Two Numbers - LeetCode

The document describes the LeetCode problem 'Add Two Numbers', which involves adding two non-empty linked lists that represent non-negative integers stored in reverse order. The task is to return the sum as a linked list. It includes a brief overview of the problem and a reference to the solution structure in Python.

Uploaded by

astutikumari2.0
Copyright
© All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

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

You might also like