Linked List Explained In 2 Minutes

Linked list is simple and common data structure which can be used to implement other data structures such as queue and stack. Let s take a closer look at it. Linked list is, a group of elements called nodes where each node, contains data. And link, to the, next node! The, beginning! Of the linked list is stored in a. Head pointer, which points to the first node Link of the last node, is set to NULL to mark the end of the list. Linked list is linear data structure like the array, but unlike the array it s also dynamic, so it can grow or shrink. While the program is running, We can add new elements very easily and by inserting at the beginning, we will have constant complexity. Searching and accessing, on the other hand, can be very slow, as we have to start at the head and follow the links one by one till we find the desired element. There are many implementations of linked list. Singly linked one goes only in one direction. If we need to traverse also backwards, we will use the Doubly linked list where nodes contain also link to the previous node. This, however, increases the memory usage as we have to store the pointers somewhere. Another type is Circular. Instead of setting the link of the last node to NULL, we can set it to point back to the first node And that s it Thanks for watching. If you enjoyed this video, please hit that like button And don t forget to subscribe, to see more videos like this in future.

As found on YouTube

AI Entrepreneur Fortune


Discover more from Automatically generating your monthly income?

Subscribe to get the latest posts sent to your email.

Author: yousekbastellinek

Hello, my name is Jose Amorós first of all I wish you a warm welcome to my blog. It will be a pleasure to share with all of you information about my career and thus evaluate knowledge that will be beneficial for both of us. Now that you know me, I give you a warm welcome and thank you for visiting my profile. Do not hesitate to contact me. I will answer all your questions and doubts that you have, greetings and welcome!

Leave a Reply