Data Structures Using C++: Implementation - Inserting a Node into a Linked List (Sorted Linked List)
Related Videos:
Inserting a Node into a Linked List (Logical Representation) • Data Structures Using ...
Traversing a Linked List • Data Structures Using ...
Linked List Implementation Part II (List Class) • Data Structures Using ...
Linked List Implementation Part I (Node Class) • Data Structures Using ...
Concepts:
How to implement an insert function in C++ to maintain a sorted linked list.
Insertion into an empty list
Insertion at the head of a list
Insertion beyond the head of a list
Traversal of a linked list to find insert location.
Usage of a current and trail pointer for inserting a node.
Пікірлер: 28
8 years since you posted but this video just saved my weekend. Thank you!!
11 years later and it is amazing
I like that you use current and trial variables instead of the vague "temp1, temp2" of other KZreadrs. It made me understand the concept much better
i fucking love you bro.
Very useful vid. At the end of your videos please include a shot of the whole thing so that we can see it in it's entirety. It would make it a lot easier to understand all at once as opposed to jumping around in the vid to see the different parts.
You taught me a lot in this series of videos. I understand linked list more. Very Helpful videos, thank you!
Thank you so much for posting this as well as your video explaining the logic graphically - being able to go over a good explanation over and over is so helpful.
Thank you sooo much!! You are a life saver. I could not figure out where I was going wrong on my college homework and you saved me after hours of debugging.
This is the best tutorial explaining inserting nodes into a linked list that i have seen! Showing the logical steps and then the implementation is awesome! it really helped me understand. I first did linked lists using structs in C and i found linked lists in c++ harder to understand (in terms of code reading! easier in terms of amount of code) But these linked list tutorials really helped me to get a good grasp of not only an OOP implementation of linked lists, but classes in general! THANKS!
This was GREAT i have viewed tons of programming videos and this really helped unlike others!!
string comparison compares length, I dont know how you are doing this without operator overloading
This is great, thank you! I was able to use this to do an insertion for doubly linked lists.
thank you..this video saved my life
thanks a lot ! for your info, the command if ( curr->name >= newNode->name) in line 63 didn't work for me, so i used strcmp instead.. best regards, Gilbert
Thank you very much. Was very useful. Thanks once again.
Thank you for this!
A very big thanks to you :)
Thank you king 😎
Very useful.. it helped me a lot Thank you :)
Thank You good sir, I manage to type what you typed in this video just by watching your conceptual drawing one :)
@aditya234567
7 жыл бұрын
good job!
great video
thank u sir :)
In Case 3, how does it change the head again? you aren't setting the head any more only the local variables newNode->next and trail->next. How does it know that it has to change the head as well?
Great Tutorial ! Going through all of them-->Data Structures. I understand a lot from your video. How can i modify this program so that user can input phone numbers(format xxx-xxx-xxxx) and ages with no duplicated ID . And also add method swap(int id 1, int id2) to swap the location of id1 and id2 in the list. Please help ! Thankx.
What about delete? I was always taught, that if you create variable or array or... with dynamic allocation, you need to create delete function so you won't have a leak in a memory? You don't need them with lists?
@TheThird555
7 жыл бұрын
Never mind. You mentioning this issue in the next videos. Thank you for the great videos on the linked lists.
How to insert in the last node ?