Merge Two Sorted Lists - Leetcode 21 - Linked Lists (Python)

preview_player
Показать описание


Please check my playlists for free DSA problem solutions:

My Favorite Courses:

Data Structures & Algorithms:

Python:

Web Dev / Full Stack:

Cloud Development:

Game Development:

SQL & Data Science:

Machine Learning & AI:
Рекомендации по теме
Комментарии
Автор

Master Data Structures & Algorithms For FREE at AlgoMap.io!

GregHogg
Автор

This is the only explanation that makes sense, I prefer this over the neetcode video.

BilalTroll
Автор

a issue which might be either me or bcom someone elses problem
in ur c++ solution : correc the dummy node initialization ListNode*dummy = new ListNode(0), this works everytime and doesnt produces error

akshatsingh
Автор

thanks greg, i was not able to understand how its O(1) space until i saw your whiteboarding

AmanjotSingh-rjox
Автор

loved the explanation
i've watched other videos where they created a new list and just added the values in sorted order
changing the pointers is what was asked here
Thank you very much <3

itsurabhi
Автор

your videos are always so clear and helpful! thank you!

yvettcodes
Автор

Thank you so much.This was really easy to understand.

darshanamohanan
Автор

can't thank you enough gregg !!!!

creatorsstudio
Автор

You made it easy to understand. Nicely explained.

prathameshpatankar
Автор

Really clear explanation, thank you so much! keep up the good work

软件实验室
Автор

What would a solution look like if we were asked to create a new node and then add it to our linked list? I am trying to implement that but i am struggling

mroafish
Автор

Thank you for the explanation. Very clear and neat. I'm a python-virgin and have two trivial questions
1. how do you test the code? I've written a code and test it on leetcode and it's fine but when running on python, I can't test it and got error!
2. Why do you insert # behind ListNode class? if it is excluded from the code how does the remaining part of the code work?

ECOHunter