Master Data Structures & Algorithms For FREE at AlgoMap.io!
@BilalTroll3 ай бұрын
This is the only explanation that makes sense, I prefer this over the neetcode video.
@GregHogg3 ай бұрын
Glad to hear it!!
@Fam-m4i3 ай бұрын
Neetcode sucks man . I get bored watching his videos
@akshatsingh98306 күн бұрын
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
@yvettcodesАй бұрын
your videos are always so clear and helpful! thank you!
@itsurabhi5064 ай бұрын
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
@GregHogg4 ай бұрын
No problem!
@darshanamohanan61013 ай бұрын
Thank you so much.This was really easy to understand.
@AmanjotSingh-rj7ox3 ай бұрын
thanks greg, i was not able to understand how its O(1) space until i saw your whiteboarding
@abhishekgeorge86262 ай бұрын
can u explain me who it is o(1) im also confused
@creatorsstudio93 ай бұрын
can't thank you enough gregg !!!!
@christianjt70183 ай бұрын
Very clean solution, thanks a lot!
@GregHogg3 ай бұрын
Thank you!
@Everafterbreak_3 ай бұрын
really good explanation bro!
@pound979922 күн бұрын
HOW IS THAT AN EASY QUESTION
@prathameshpatankar18647 ай бұрын
You made it easy to understand. Nicely explained.
@GregHogg7 ай бұрын
Glad to hear it!
@软件实验室6 ай бұрын
Really clear explanation, thank you so much! keep up the good work
@GregHogg6 ай бұрын
Very glad to hear it! Thanks so much :)
@samfromuk7965 ай бұрын
Love the explanation
@mroafishАй бұрын
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
@chuckyyysАй бұрын
def mergeTwoLists(self, list1, list2): cur1, cur2 = list1, list2 # dummy node cur3 = l3 = ListNode() while(cur1 and cur2): # link current (of result list) to the new node cur3.next = ListNode() # move current to the new node cur3 = cur3.next # compare values if (cur1.val
@ECO720Hunter6 ай бұрын
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?
@GregHogg6 ай бұрын
Good question. Basically leetcode puts the class in a hashtag for readability. But the class is actually necessary. It's leetcode being weird