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:
Linked List: • Linked List Data Structure explained ...
Array Data Structure: • Array Data Structure explained with V...
📘 A text based explanation is available at: studyalgorithms.com
Code on Github: https://github.com/nikoo28/java-solut...
📖 Reference Books:
Starting Learn to Code: https://amzn.to/36pU0JO
Favorite book to understand algorithms: https://amzn.to/39w3YLS
Favorite book for data structures: https://amzn.to/3oAVBTk
Get started for interview preparation: https://amzn.to/39ysbkJ
🔗 To see more videos like this, you can show your support on: https://www.buymeacoffee.com/studyalg...
🎥 My Recording Gear:
Recording Light: https://amzn.to/3pAqh8O
Microphone: https://amzn.to/2MCX7qU
Recording Camera: https://amzn.to/3alg9Ky
Tablet to sketch and draw: https://amzn.to/3pM6Bi4
Surface Pen: https://amzn.to/3pv6tTs
Laptop to edit vidoes: https://amzn.to/2LYpMqn
💻 Get Social 💻
Follow on Facebook at: / studyalgos
Follow on Twitter at: / studyalgorithms
Follow on Tumblr at: / studyalgos
Subscribe to RSS feeds: https://studyalgorithms.com/feed/
Join fan mail: http://eepurl.com/g9Dadv
#leetcode #programming #interview