Skip to main content
Admissions guidance, study banks, and career tools — get started on Shalyam

Add Two Numbers (Digits in Reverse Order)

Medium Linked List

Two non-negative integers are stored in two linked lists with the digits in reverse order (least significant digit first). Add them and print the sum in the same reverse-digit format.

Constraints

1 <= n, m <= 100 0 <= digit <= 9 No leading zeros except for the number 0 itself

Discussion

No discussions yet.

Rewards · v2.1

Get Exclusive Insights with Every Issue

Join Shalyam Newsletter

Stay ahead in education, research, and innovation—straight to your inbox.