Insert a Node in a Linked List | Animations, Examples and Code | Study Algorithms

preview_player
Показать описание
Inserting a node in a linked list primarily consists of creating a node that you want to insert and then update the pointers of the existing list such that the new node is also traversed. Once the node is added, it can be reached from the head. Based on this idea, the video shows how you can insert a node in the beginning, in the end and int the middle. You will also find code samples for each of the use cases implemented in JAVA

Chapters:
00:00 - Intro
00:40 - General idea to Insert a node
02:14 - Insert in the Beginning
03:46 - Code to insert a node at beginning
04:49 - Insert at End
06:01 - Code to insert a node at end
07:54 - Insert in Middle
09:01 - Code to insert a node in middle
11:46 - Final Thoughts

📚 Links to topics I talk about in the video:

📖 Reference Books:

🎥 My Recording Gear:

💻 Get Social 💻

#leetcode #programming #interview
Рекомендации по теме
Комментарии
Автор

Thanks alot 😊😊u taught me in a very easy way

appikeeru
Автор

What a great way to explain this man! I feel relieved whenever I see some quality content on programming, which can help me to improve my understanding, and your channel is one of the best. Could you please upload about SQL too?

RishiRaj-zsfh
Автор

in the insertion in the middle part the loop runs four times which leads to the pointer ending up pointing to node with value 5 . try correcting that

simonaseged
Автор

how i will call it in main function that parameters name in circle brakcet like postition

infinite
Автор

Hello Bro, which tools are you using to trace linked List ?

abdellahelmamoun
Автор

great way of teaching i love your teaching sir thanks a lot sir....

rayyan