I've watched sooooooooo many KZbin tutorials - this guy is legit the best teacher I've come across so far! Very clear. Thank you so much Alvin
@ragsbigfella3 жыл бұрын
I love Alvin's way of teaching. I loved his Dynamic programming video. Please ask him to make some more videos like Graphs and Trees.
@spaceface22883 жыл бұрын
He already made videos on those topics bruh
@veganaiZe3 жыл бұрын
Graphs: kzbin.info/www/bejne/aJC4ppyuqchon5I
@calebo.a.62702 жыл бұрын
Same here
@mehulsolanki94352 жыл бұрын
@@spaceface2288 He's going to love them.
@maozbenkalif5982 жыл бұрын
08:25 one small correction, the order of inserting a node to a linkedlist is that the node you wish to enter has to point first to the node and then you have to take node b to point on node q, if you start by pointing b to q first you will lose all the data of c and d. Great video !! loved it
@ehabahmedyassen Жыл бұрын
yup, q.next = c then b.next = q
@m.y.723010 ай бұрын
Hands down the best explanation for linked list. It finally clicked on me after 3 days banging my head against the wall. His algorithms are way more intuitive, both iterative and recursive versions, much much more than what other instructors talked about. Thank you!
@EnriqueMoranG3 жыл бұрын
Bro you explain so good that i've been able to perform the tasks without watching the whole video. Just got the idea and solved it by myself. I love you, Alvin. Happy New Year, mate!
@aliqyan982711 ай бұрын
same!
@Jamesxoxo892 жыл бұрын
Started learning linked list this week and could not understand the code for it at all until this video... Super appreciative, this community exists.
@chukwunta2 жыл бұрын
This is all you need to learn about linked-list. This is my fifth time viewing and I always seem to comeback and learn something new. It is such an amazing resource. Thanks @Alvin
@morenomt272 жыл бұрын
Thank you for this Alvin. I had a hard time refreshing linked list by watching countless tutorials and I can't understand why I can't move on with problems. While you are explaining, I am able to answer problems!
@AshenafiGodana-m1u6 ай бұрын
This is the only programming video I watched from start to finish with one sitting and I clearly understood LinkedList. Thank you Alvin!
@zeynepdagci12 жыл бұрын
your courses're amazing!! I have an interview with google in a couple of hour, I hope your courses work for me !!!
@fastdesigns88952 жыл бұрын
did they
@tf1n2 жыл бұрын
Best video on LL’s that I’ve seen. Thank you, Teacher Alvin!
@abolfazljahangir16519 ай бұрын
You are amazing Alvin! I've learned a lot from you🙌
@sriram-uu6yd3 жыл бұрын
Trust me, I was searching for an hour yesterday to find a good resource to learn Linked Lists. Thank you, FCC.
@AnkurSharma-hf9jn Жыл бұрын
Best explanation ever Now I'm much more confidence writing link list problem.
@RahulD6003 жыл бұрын
I love Alvin's way of teaching! He's really a master! Thank you very much!
@Pupu._2 жыл бұрын
Alvin is so to the point and voice is good to hear 🙌
@talios682410 ай бұрын
Absolutely the best tutorial video on linked lists. Thank you so much, Alvin! Fantastic teacher.
@skitzhills Жыл бұрын
Alvin you are the best programming sensei. This Linked List tutorial is just ridiculously good...
@pankkajsen3 жыл бұрын
Given a blind like because of Alvin👍…and added to my “Immediate watch” list 😀
@Luke-gr6dg11 ай бұрын
I love that you said "A"'s next is "B". That makes link list much easier to conceptualize than other sources which overly complicate it.
@whetfaartz668510 ай бұрын
That's exactly how I see it
@zeganikhalid97302 жыл бұрын
man this is the best explanation ever.
@tonyseben Жыл бұрын
For the iterative Zipper implementation, we need a null check for head1 (ideally for head2 as well). if(head1 === null) return head2; if(head2 === null) return head1;
@a_maxed_out_handle_of_30_chars3 жыл бұрын
seeing alvin puts a smile on my face :)
@freecodecamp3 жыл бұрын
Same.
@omarkyon19333 жыл бұрын
Really cool to see you here Alvin. Great explanations as usual
@myrusEW Жыл бұрын
I just realized watching theory tutorials in other languages actually makes learning so much more intuitive, since you can't just blindly copy. You're forced to understand how your language works, and you're forced to implement those ideas without really being able to "cheat". Wow. I'm gonna start watching C tutorials and do them in python. I'm about to hit 10x developer once I understand all this
@servantofthelord8147 Жыл бұрын
This is a very good point. I never realized this. This whole time I was trying to avoid tutorials in different languages, not realizing that they were the key to helping my solidify my understanding. Good observation!
@madman3727 Жыл бұрын
same I was forced to code this in my learning language and I was surprised to see how quickly I learned
@ArudSekaBerneLearnings8 ай бұрын
I love the way he explain and able to grasp things even though I am a beginner.
@sanjaypaudel32962 жыл бұрын
Alvin we need more of you guys. Grow up your channel. You are a hero
@foravidalalsharma12912 жыл бұрын
I wish you had Java as one of the programming languages, but I still loved your course and was able to interpret everything in Java because of how you explained the algorithms, it was so simple to even understand recursive, something I always mess up. Thank you!!
@michaels7159 Жыл бұрын
No
@av12-db3 жыл бұрын
Your videos are awesome..Saw your video on Dynamic programming and since then i am not facing any problem in solving such questions.
@madhubalajayakumaran93402 жыл бұрын
loved the explanation! Though I knew all these concepts before, I just watched anyway.
@pauzhou8639 Жыл бұрын
omg who is this guy? He has the best algor interview videos !!
@andiuptown17114 ай бұрын
Alvin! Ex Google engineer. He also put out a new React + Tailwind course
@doctype74302 жыл бұрын
I like the way Alwin simplifies the concepts and problems. learnt a lot. Thanks
@shyamprakashm63253 жыл бұрын
What a co-incidence .tomorrow we have a amazon technical interview , hope It would help.
@sampathsai55093 жыл бұрын
I love the way you teach 😍. Please create a course on Backtracking.
@thelastminutetrade3 жыл бұрын
Bro your research and best way of analysis is amazing. Who else find this list helpful ❣️❣️
@sculptscript Жыл бұрын
9:07 Linked list insertion at an index which is not at the head or the tail should be O(k) Time right?
@Jutastre6 ай бұрын
Yup, and because you're hopping through so many pointers, you get a lot more cache misses than an array, more often than not making it slower than an array in practice.
@vaibhavpathak7863 жыл бұрын
Thanks!
@CHITUS3 жыл бұрын
Bro your research and best way of analysis is amazing. Who else find this list helpful ️️
@andr3w3218 ай бұрын
@1:21:40 Unless I'm missing an edge case, there's no need for the count variable in the iterative zigzag solution. Just move tail twice in each while loop. C++ code below Node* zigzag3(Node* head1, Node* head2) { Node* tail = head1; Node* cur1 = head1->next; Node* cur2 = head2; while(cur1 && cur2) { tail->next = cur2; cur2 = cur2->next; tail = tail->next; tail->next = cur1; cur1 = cur1->next; tail = tail->next; } if (cur1) tail->next = cur1; if (cur2) tail->next = cur2; return head1; }
@sufalt1234 ай бұрын
this was my solution: template Node* zipper(Node* head1, Node*head2) { auto current1 = head1; auto current2= head2; while(current1 != nullptr && current2 != nullptr) { auto next1 = current1->next; auto next2 = current2->next; current1->next = current2; current2->next = next1==nullptr?next2:next1; current1=next1; current2 = next2; } return head1; }
@michaelkofron3994 Жыл бұрын
Why at 30:53 does he create a new function for the recursive version? Why is he afraid of creating multiple arrays when JS arrays are pass by reference?
@eshw232 жыл бұрын
Amazing, this guy is dynamic and engaging
@Guru_Bloke2 жыл бұрын
Thanks. This is top notch. On my way to subscribe. Frankly best content ever. Quick and eloquent.
At least one error you will get is that you will be stuck in a loop. ptrA and ptrB are pointers and not booleans. Their values will likely be non-zero which will be interpreted as true. You need " While (ptrA != nullptr &&...) ". Something like that. Here is my code which I think works how you intended. /// Assumes that neither list is empty. void * zip(Node* f, Node* s){ while(f != nullptr && s != nullptr){ // Save next pointer. Node* n = f->next; // Point element from this list to other list. f->next = s; // Update first and second node. f = s; s = n; } }
@sane72632 жыл бұрын
@@nonconsensualopinion it works the way it is intended, NULL will be treated as false. Your code it correct, but I am not quite sure where am' wrong
@andreytsapko42132 ай бұрын
Best explanation of LinkedList ❤
@tomashoracek718711 ай бұрын
Awesome vids helping me with my uni subject Foundations of Programming, they give us 15 small programming exercises every week for points that count to final mark and also credit and they gave us exercises such as programm ringbuffer using linked list, program queues and stack using linked list. Merge two ordered linked lists and so on xd
@Sz-hi7wj3 жыл бұрын
welcome back Alvin!
@rashidselemani4752 жыл бұрын
The way you explain the link list, even a foolish can understand it. Thanks a lot 😊
@eda-un8zr2 ай бұрын
Awesome. Alvin is a great teacher
@stanleyjekwu68102 жыл бұрын
The best I have seen so far...Thank you so much... I just checked your platform to make a purchase to go deeper but I couldn't find C# language option (that's my core language). I don't know if there will be room for that in the future? I greatly benefited from this JavaScript version.
@nathanexclusive92612 жыл бұрын
The way Alvin teaches linked lists makes these concepts NOde big deal. Haaa
@japarjarkynbyek8494 Жыл бұрын
Love it as always! Big kudos!
@saplay33723 жыл бұрын
All the members of your department are great
@heybibleefan Жыл бұрын
BEST LINKEDLIST VIDEO EVER
@alexbolych236610 ай бұрын
Thank you very much. The best explanaition of js linked lists
@sandeepchandupatla7832 Жыл бұрын
Completed watching this tutorial, very informative, thanks a lot 🎉😊
@johnnyf16242 жыл бұрын
i rlly like the way you explain the problem step by step.
@bruhmoment37312 жыл бұрын
what an excellent teacher!
@iamlookto3 жыл бұрын
Realy nice teaching style. Just one question. @ 37:00 it says the space is O(n) for the recursive sumList function. That is true for how it is implemented. But couldn't we also achieve O(1) by passing the sum variable into every recursion like it's done with the recursive linkedListValues? Wouldn't hat be much more optimised?
@atharvarane61653 жыл бұрын
From what I understand, space complexity of O(n) means, in the worst case there will be 'n' call stacks ( i.e when we reach the tail of the linklist), thus passing the integer as a argument will still create n call stacks, hence O(n).
@iamlookto3 жыл бұрын
@@atharvarane6165 then why is it different in the recursive version of linkedListValues?
@atharvarane61653 жыл бұрын
@@iamlookto Must be a mistake, because the memory complexity is determined by the number of return statements because each function call will be stored on the program stack. To generalize, a recursive function's memory complexity is O(recursion depth). As our tree depth suggests, we will have n total return statements and thus the memory complexity is O(n).
@kuxnal2 жыл бұрын
The video that I had been searching. Thank you so much
@saurabhnambiar55143 жыл бұрын
The Dynammic programming one was a blockbuster hence m here cheer
@rebeccaburch33342 жыл бұрын
for zipperlist iterative approach, when you add the rest of the list that is leftover tail isn't reassigned to be the new tail. In this case, you're just using "tail" as a pointer to the current end of the constructed list. And tail isnt assigned at all in the recursive solution. Would there be an extra step to iterate through the leftover list to the end and reassign tail? Thanks for your great videos 🔥🔥🔥
@georgeimus610210 ай бұрын
not gonne lie thought this video was gonna be a waste of my time but I learned linked lists in just the first 15 mins of the video and was able to swift by these easily.
@kamaboko12 жыл бұрын
Hands down the best algorithm explanations. $ Structy purchase.
@ahmedhamdytube2 жыл бұрын
Alvin you are a great teacher.
@DrewOsmond3 жыл бұрын
Great video Alvin!
@hi-tk4hu2 жыл бұрын
Best video on LL for beginner
@sufalt1234 ай бұрын
kinda cool that i found different (tho worse) solutions to some of the problems on my own :D
@kehinde101002 жыл бұрын
Best teacher ever!!!
@mishkathossain29843 жыл бұрын
Alvin the boss is back in the hood!!!!!!
@abdulwakilabdulkadir82882 жыл бұрын
My comment may not matter much, but this video is amazing. I have to say
@sharangkulkarni17592 жыл бұрын
last zipper recursion was awesome beauty
@PrashantNigam3 жыл бұрын
My dude is back!!!
@jimmykitty3 жыл бұрын
As Always, Thanks a Trillion..... ♥️♥️♥️♥️♥️♥️♥️♥️🌿🌿🌿🌿🌿🌿
@ayushmishra67409 ай бұрын
Smooth Explanation.
@dev-skills2 жыл бұрын
19:15: great advice not to premature checking on linked list
@intcoder2 жыл бұрын
Awesome Video!!! thanks for the detail explanations.
@eidmone86843 жыл бұрын
ALVIN the GOAT!
@gunratnamore3 жыл бұрын
Helpful always 👍
@mrrishiraj883 жыл бұрын
True
@ankit-h84703 жыл бұрын
@@mrrishiraj88 This_Reply = True;
@TheManBehindTheScen110 ай бұрын
My Recursive Solution for Zipper List is MORE concise and easier to learn: const zipperLinkedListRec = (head1, head2) => { if (!head2) return; let temp = head1.next; head1.next = head2; zipperLinkedListRec(head2, temp); return head1; }; *This assumes that both lists are non-empty like in video
@sufalt1234 ай бұрын
cooooooooool
@AlThePal782 жыл бұрын
this is literally the best video I seen on this. However, you said it can be anything in the data. However, in C# and Java would be different. it would have to be what you choose it to be because you have to initialize the type of data it has to enter so all the nodes would have integers. Am I right or am I wrong?
@dzni90612 жыл бұрын
you have saved my life
@vishaloza69813 жыл бұрын
thank you! needed this video!
@johnbright81722 жыл бұрын
Thank you so much. You're the best!!!!
@ehabahmedyassen Жыл бұрын
I solved ZipperList iteratively without a counter to toggle between the two lists because at the start, i position the tail at the end of the initially constructed zipped list then within the while loop i construct the next node as a linkedlist of two nodes (current1.val) -> (current2.val) and then i update the tail and set the constructed two-nodes-list as its next then i refer to the last node of two-nodes-list i have just added as the new tail. private static Node zipListsIterative(Node head1, Node head2) { Node zipped = new Node(head1.getVal(), new Node(head2.getVal())); Node tail = zipped.getNext(); Node current1 = head1.getNext(); Node current2 = head2.getNext(); while (current1 != null && current2 != null) { Node next = new Node(current1.getVal(), new Node(current2.getVal())); tail.setNext(next); tail = next.getNext(); current1 = current1.getNext(); current2 = current2.getNext(); } if (current1 == null) tail.setNext(current2); if (current2 == null) tail.setNext(current1); return zipped; } and recursively, i wrote the recursive case as one liner by making use of the constructor: Node(String val, Node next) private static Node zipListsRecursive(Node head1, Node head2) { //base cases if (head1 == null && head2 == null) return null; if (head1 == null) return head2; if (head2 == null) return head1; //recursive case return new Node(head1.getVal(), new Node(head2.getVal(), zipListsRecursive(head1.getNext(), head2.getNext()))); }
@havefun55193 жыл бұрын
Thanks man, your recursive method is great
@havefun5519 Жыл бұрын
2nd watched.
@havefun5519 Жыл бұрын
Last zipper recursive method is not easily to understand.
@alexroy42352 жыл бұрын
Excellent explanation
@rem.kudusov Жыл бұрын
Thank you, bro!
@monadastar93932 жыл бұрын
great help! thank you
@Singh54321Ай бұрын
learned trees now this thanks man
@banjohead663 жыл бұрын
I believe that it was David Seville who so famously said ALVIN!
@mohamedtaherali8914 Жыл бұрын
i think insertion in time complexity is O(n) in worst case this is most significant for linked list because we cant reach index till we reach the previous one and so on .. that's right ?
@LongDistance222 жыл бұрын
You teach better than majority of my professors. Why couldnt you be my professor? Why am i stuck with spoiled professors that have no passion for teaching and explain bad
@orangekitty51922 жыл бұрын
Great teacher!
@teodora_cassualo2 жыл бұрын
best teacher :DD
@79Nardo3 жыл бұрын
Excellent!
@parmachine470 Жыл бұрын
Do you just use a wrapper function in your course when you have visited or memo?