Add Two Numbers II | Leet code 445 | Theory explained + Python code

preview_player
Показать описание
This video is a solution to Leet code 445, Add Two Numbers II. I explain the question, go over how the logic / theory behind solving the question and finally solve it using Python code.

Comment below if you have a better solution to this problem!

Let me know if you have any feedback and don't forget to subscribe for more videos!

Code:

Time stamps:
0:00 Question
1:37 Solution Explained
5:20 Python Code
11:18 Solution 2

More leetcode questions solved:

Gear used:
Рекомендации по теме
Комментарии
Автор

your second solution still produces the reversed linked list,
delete line 26, but in that case, you don't need the curr variable anymore as a placeholder since the head serves that purpose.

caldan
Автор

I'm a noob and I dont get why after the 3rd while loop curr is now the full linked list, I thought it would be what head is

CS_nb
Автор

Wont work with larger numbers, integer overfloats and also Long overfloats in java

chaitanyabalanagu
Автор

but solution is fail number of node is>18

sahilbansal
Автор

Should consider the boundary of integer

jingli
join shbcf.ru