[Java][LeetCode][Linked List] Add Two Numbers #2

Input: l1 = [2,4,3], l2 = [5,6,4]
Output: [7,0,8]
Explanation: 342 + 465 = 807.
Input: l1 = [0], l2 = [0]
Output: [0]
Input: l1 = [9,9,9,9,9,9,9], l2 = [9,9,9,9]
Output: [8,9,9,9,0,0,0,1]
  • The number of nodes in each linked list is in the range [1, 100].
  • 0 <= Node.val <= 9
  • It is guaranteed that the list represents a number that does not have leading zeros.




Love podcasts or audiobooks? Learn on the go with our new app.

Recommended from Medium

Developing Mau King — Test Driven Development of the Server

Kubernetes Secrets Encryption Using Helm Secret Plugin and SOPS

Starting with AWS DynamoDB using Python

Powerful E-Commerce Hosting-Ideal choice for your Business — Blog- Web Hosting Services | Best…

Deploying Production Meteor in 2017

System Monitor with mWatcher

Create your own currency converter page with Python (Flask)

Why do I have to learn geometry?

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
SP Hou

SP Hou

More from Medium

Major League Sandbox Part 8: Series 6–8

How to complete all tasks in the OmniFlix Studio | FlixNet-3 Campaign

Scenario Analysis of S&P 500 Index

TRUE NORTH — Script a positive 12-month future vision for your life