{"id":81069,"date":"2021-06-21T09:00:35","date_gmt":"2021-06-21T03:30:35","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=81069"},"modified":"2021-06-21T09:00:35","modified_gmt":"2021-06-21T03:30:35","slug":"linked-list-in-data-structure","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/","title":{"rendered":"Linked List in Data Structure"},"content":{"rendered":"<p>There are broadly two types of Data structures: Linear and Non-linear. Linear data structures are those in which every element is connected to the previous element and the elements are present at a single level.<\/p>\n<p>Some examples of linear data structures are- Arrays, linked lists, stack,s and queues. Thus, a linked list is a linear data structure in which elements are not stored contiguously in the memory.<\/p>\n<p>Let&#8217;s learn about Linked List in Data Structure.<\/p>\n<h3>What is a Linked list?<\/h3>\n<p>1. A linked list a collection of randomly stored elements in the memory. These elements are called nodes.<\/p>\n<p>2. We use pointers to connect and maintain the linear order between these random data points.<\/p>\n<p>3. Every node of a linked list consists of at least two parts-<\/p>\n<ul>\n<li>Data<\/li>\n<li>Address of next node(pointers)<\/li>\n<\/ul>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/TechVidvan-Linked-list-normal-image01.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81181\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/TechVidvan-Linked-list-normal-image01.jpg\" alt=\"Linked List Node Structure\" width=\"1080\" height=\"440\" \/><\/a><\/p>\n<p>The above diagram shows that in a linked list, the elements are not stored contiguously but it appears that they are stored contiguously.<\/p>\n<p>The most important thing in a linked list is the pointer. We need to have a starting pointer (HEAD) to access the linked list. The last node in the linked list has a pointer to NULL.<\/p>\n<h3>Properties of linked list in Data Structure<\/h3>\n<p>1. The elements of the linked list may or may not be present contiguously in the memory.<\/p>\n<p>2. We need not declare the list size in advance.<\/p>\n<p>3. We can allocate the memory dynamically whenever we need to add more nodes or perform any other operation on the list.<\/p>\n<p>4. The linked list cannot contain an empty node.<\/p>\n<p>5. A node in a linked list is a combination of two data types- a pointer and a primitive data type such as int or float. Therefore, we use structures to implement a linked list.<\/p>\n<h3>Applications of Linked List in Data Structure<\/h3>\n<p>1. We can implement stack and queue data structures using a linked list.<\/p>\n<p>2. It is used in the implementation of graphs. Example- Adjacency list representation in a graph makes use of a linked list.<\/p>\n<p>3. Symbol table management in compiler design uses a linked list.<\/p>\n<p>4. It is used to prevent collision in hashing.<\/p>\n<p>5. Linked list is used for DMA (Dynamic Memory Allocation).<\/p>\n<p>6. We can use linked lists for performing arithmetic operations on long int.<\/p>\n<p>7. Representation of a sparse tree matrix also requires a linked list.<\/p>\n<h3>Data Structure Linked List vs Array<\/h3>\n<p>Both arrays and linked lists have their own use cases, advantages as well as disadvantages.<\/p>\n<p>Let us see a few comparisons between them.<\/p>\n<table>\n<tbody>\n<tr>\n<td><b>ARRAY<\/b><\/td>\n<td><b>LINKED LIST<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Arrays are contiguously stored in the memory.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Linked lists are not necessarily contiguous inside the memory.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">The array size should be declared inside the program in advance.<\/span><\/td>\n<td><span style=\"font-weight: 400\">We need not declare the size of the list in advance.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">It is difficult to change the size of the array afterwards.<\/span><\/td>\n<td><span style=\"font-weight: 400\">We can expand or shrink a linked list any time during the execution of the program.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Arrays allow random access of elements.<\/span><\/td>\n<td><span style=\"font-weight: 400\">In a linked list, we cannot randomly access any element, we need to traverse the list from the beginning.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Arrays have slower insertion or deletion time as compared to linked lists.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Linked lists have a slower search time because of the absence of random access.<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">Arrays require less memory per element.<\/span><\/td>\n<td><span style=\"font-weight: 400\">Lists require more memory because we need to maintain extra pointers.<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Types of linked lists<\/h3>\n<p>There are three types of lists in data structures:<\/p>\n<p>1. Singly-linked list<\/p>\n<p>2. Doubly linked list<\/p>\n<p>3. Circular linked list<\/p>\n<p>In this article, we are going to study about singly list.<\/p>\n<h3>Basic Operations on Linked List<\/h3>\n<p>There are certain basic operations that a linked list data structure supports. These operations are:<\/p>\n<h4>1. Traversal:<\/h4>\n<p>It means visiting each node from the beginning till the end.<\/p>\n<h4>2. Insertion:<\/h4>\n<p>This operation inserts an element at any given position in the list.<\/p>\n<h4>3. Deletion:<\/h4>\n<p>Deletion operation helps in deleting a node from the linked list.<\/p>\n<h4>4. Display:<\/h4>\n<p>This operation is used to print\/display all the data elements of the linked list.<\/p>\n<h4>5. Search:<\/h4>\n<p>search operation helps in searching an element by traversing it.<\/p>\n<h3>Declaration and Initialization of a Node in a linked list:<\/h3>\n<p>A node is a heterogeneous data type. Therefore, we use a structure to create it.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">struct Node\n{\nint data; \/\/the first part of the node where data is stored\nstruct node *Next; \/\/Self-referencing structure. It links two nodes.\n};<\/pre>\n<p>The linked list supports dynamic memory allocation. Therefore, we will use the functions malloc, calloc and realloc for memory allocation.<\/p>\n<p>The code will be:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">struct Node *Head, *Ptr; \/\/Declaring two pointers- Head and Ptr\nPtr = (struct Node *)malloc(sizeof(struct Node *)); \/\/Initializing Ptr<\/pre>\n<p>Dynamic memory is allocated inside the heap, which is why we need functions like malloc. Here, malloc will return the address of the node.<\/p>\n<h3>Traversal in a Singly Linked List<\/h3>\n<p>Traversal means visiting each node of the linked list. Once the node has been created, we can do its traversal in the following way.<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">struct Node *Ptr;\nPtr = Head;\nwhile(Ptr != NULL)\n{\n  Print (Ptr\u2192data);\nPtr = Ptr\u2192Next;\n}\n<\/pre>\n<p>The time complexity for the above pseudo-code will be O(n).<\/p>\n<h3>Insertion in a Linked List<\/h3>\n<p>When we talk about insertion in a linked list, we take into consideration three different cases:<\/p>\n<p>1. Insertion at the beginning of the list<\/p>\n<p>2. Insertion after a particular node.<\/p>\n<p>3. Insertion at the end of the list<\/p>\n<h4>1. Insertion at the beginning:<\/h4>\n<p>Insertion at the beginning means we will insert a node at the front of the list in the following way:<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/TechVidvan-Linked-list-normal-image02.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81182\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/TechVidvan-Linked-list-normal-image02.jpg\" alt=\"Insertion in Linked List\" width=\"1026\" height=\"418\" \/><\/a><\/p>\n<p>The above diagram shows that we have a linked list of the following elements: 10\u219220\u219230.<\/p>\n<p>Once we insert a new node at the beginning, the list will be 50\u219210\u219220\u219230.<\/p>\n<p><strong>Pseudo-code:<\/strong><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Void Insert_at_beginning(int key)\n{\n    struct Node *temp; \/\/temp is a pointer pointing to the node to be inserted.\n    temp = (struct Node*) malloc(sizeof(struct Node));\n    if(temp != NULL)\n    {\n        temp\u2192data = key;   \/\/key is the data value to be inserted\n        temp\u2192next = Head;  \/\/this step will make the incoming node the first node.\n    }\n}\n<\/pre>\n<h4>2. Insertion after a particular node:<\/h4>\n<p>We need to traverse all the nodes before the position of insertion of the new node. For doing this, we maintain an additional temporary pointer.<\/p>\n<p>For example, suppose we wish to link all the letters of the word \u2018TECHVIDVAN\u2019 and we forgot to add \u201cH\u201d.<br \/>\nWe can insert this \u2018H\u2019 once the list is created as shown below.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/TechVidvan-Linked-list-normal-image03.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81183\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/TechVidvan-Linked-list-normal-image03.jpg\" alt=\"Node Insertion in Linked List\" width=\"1620\" height=\"352\" \/><\/a><\/p>\n<p>In this case, we will have a temporary pointer named \u2018temp\u2019. This pointer temp will be pointing to \u2018C\u2019 because we need to insert \u2018H\u2019 after \u2018C\u2019.<\/p>\n<p>The lines of code that will help to do this will be:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">temp-&gt;Next = Ptr-&gt;Next;\nPtr-&gt;Next = temp;<\/pre>\n<h4>3. Insertion at the End:<\/h4>\n<p>To insert a node at the end of the list, we first need to traverse the whole list.<br \/>\nThe function for insertion at the end is:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">void Insert_at_end(int key)\n{\n    struct Node *temp, *Ptr;\n    temp = (struct Node*) malloc(sizeof(struct Node));\n    if(temp != NULL)\n    {\n        temp-&gt;data = key;\n        temp-&gt;Next = NULL;\n        if(Head == NULL) \/\/This will be true if the list is initially empty\n        {\n            Head = temp;\n            return;\n        }\n        Ptr = Head;\n        while(Ptr-&gt;Next != NULL)\n            Ptr-&gt;Next = temp;\n    }\n}\n<\/pre>\n<h3><span style=\"font-weight: 400\">Time complexity of Insertion in Linked List<\/span><\/h3>\n<table style=\"height: 246px\" width=\"387\">\n<tbody>\n<tr>\n<td><b>Insertion operation<\/b><\/td>\n<td><b>Complexity\u00a0<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">At the beginning<\/span><\/td>\n<td><span style=\"font-weight: 400\">O(1)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">After a particular node<\/span><\/td>\n<td><span style=\"font-weight: 400\">O(1)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">At the end<\/span><\/td>\n<td><span style=\"font-weight: 400\">O(n)<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3>Deletion from a Linked List:<\/h3>\n<p>Just like insertion, deletion also works in three different cases:<\/p>\n<p>1. Deletion from beginning<\/p>\n<p>2. Deletion at the end<\/p>\n<p>3. Deleting a node other than the first and the last node<\/p>\n<h4>1. Deletion from the beginning:<\/h4>\n<p>It involves deleting the first node of the linked list.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/TechVidvan-Linked-list-normal-image04.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81185\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/TechVidvan-Linked-list-normal-image04.jpg\" alt=\"Delete Node in Linked List\" width=\"1026\" height=\"264\" \/><\/a><\/p>\n<p>Suppose we initially had the linked list elements as 10\u219220\u219230\u219240.<\/p>\n<p>If we perform deletion of one node at the beginning, the linked list will be:<br \/>\n20\u219230\u219240.<\/p>\n<p>The function for performing deletion at the beginning is:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">void Delete_from_beginning(int key)\n{\n    struct Node *Ptr = Head;\n    if(Head == NULL)  \/\/i.e. If the list is empty\n    {\n        return;\n    }\n    Head = Head-&gt;Next; \/\/linking Head with the 2nd node of the list\n    free(Ptr);\n}\n<\/pre>\n<p>Whenever we delete a node, we make the memory area occupied by that node free by using the \u2018free\u2019 function. Otherwise, it might lead to a memory leakage problem.<\/p>\n<h4>2. Deletion at the end:<\/h4>\n<p>For deletion of the last node, we need to make the address of the second last node point to NULL. For doing this, we will make use of an extra pointer named \u2018Prev\u2019.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/TechVidvan-Linked-list-normal-image05.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81186\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/TechVidvan-Linked-list-normal-image05.jpg\" alt=\"Delete last node in Linked List\" width=\"1026\" height=\"264\" \/><\/a><\/p>\n<p>While deleting the last node, we will first free the last node and then make the Next of the second last node as NULL.<br \/>\nThe function for deletion at the end will as follows:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">void Delete_at_end(int key)\n{\n    struct Node *Ptr = Head;\n    struct Node *Prev = NULL;\n    if(Head == NULL)  \/\/If the list is empty\n    {\n        return;\n    }\n    if(Head-&gt;Next == NULL) \/\/If the list has only one element\n    {\n        Head = NULL;\n        free(Ptr);\n    }\n    else\n    {\n        while(Ptr-&gt;Next != NULL)\n        {\n            Prev = Ptr;\n            Ptr = Ptr-&gt;Next;\n        }\n        free(Ptr);\n    }\n}\n<\/pre>\n<h4>3. Deletion after a particular node:<\/h4>\n<p>If we have the address of a particular node, we can always delete the node next to it.<\/p>\n<p>Let us consider a linked list: 10\u219220\u219230\u219240.<\/p>\n<p>Suppose we wish to delete 20 from it, we will delete the node containing 30 and then rewrite the value of 20 as 30.<\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/TechVidvan-Linked-list-normal-image06.jpg\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-81187\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/TechVidvan-Linked-list-normal-image06.jpg\" alt=\"Delete any node in Linked List\" width=\"1026\" height=\"264\" \/><\/a><\/p>\n<p>The lines of code for doing this will be:<\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">Ptr-&gt;data = Ptr-&gt;Next-&gt;data;\nPtr = Ptr-&gt;Next;\nPtr-&gt;Next = Ptr-&gt;Next-&gt;Next;\nfree(Ptr);\n<\/pre>\n<p><span style=\"font-weight: 400\">Thus, after deleting 20, the new list will be 10\u219230\u219240.<\/span><\/p>\n<h3><span style=\"font-weight: 400\">Time complexity for Deletion operation:<\/span><\/h3>\n<table>\n<tbody>\n<tr>\n<td><b>Deletion operation<\/b><\/td>\n<td><b>Complexity\u00a0<\/b><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">At the beginning<\/span><\/td>\n<td><span style=\"font-weight: 400\">O(1)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">After a particular node<\/span><\/td>\n<td><span style=\"font-weight: 400\">O(1)<\/span><\/td>\n<\/tr>\n<tr>\n<td><span style=\"font-weight: 400\">At the end<\/span><\/td>\n<td><span style=\"font-weight: 400\">O(n)<\/span><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n<h3><span style=\"font-weight: 400\">Reversing a linked list:<\/span><\/h3>\n<p><span style=\"font-weight: 400\">To reverse a linked list, we need to reverse the pointers.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">For example, if the list is 10\u219220\u219230\u219240,\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">On reversing we will have 10\u219020\u219030\u219040 and 10 will point to NULL.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The recursive approach to reverse a list is as follows:<\/span><\/p>\n<pre class=\"EnlighterJSRAW\" data-enlighter-language=\"generic\">int Reverse_list(struct Node *Head)\n    {\n        struct Node *remaining;\n        if (Head == NULL || Head-&gt;Next == NULL)\n            return Head;\n        Node* remaining = Reverse_list(Head-&gt;Next);\n        Head-&gt;Next-&gt;Next = Head;\n \n        Head-&gt;Next = NULL;\n \n        return remaining;\n    }\n<\/pre>\n<h3>Uses of Linked List<\/h3>\n<p>1. The size of the linked list is limited to the memory size due to dynamic memory allocation. That is why, we need not declare the size of the list beforehand, rather we can do that at run time.<\/p>\n<p>2. A linked list can never contain an empty node.<\/p>\n<p>3. Although a linked list is a linear data structure, it is unnecessary to store it contiguously in the memory. This is because the list is connected through addresses\/pointers. This helps in the efficient utilization of memory space.<\/p>\n<p>4. The singly linked list can store the values of primitive data types such as int, char, float. The list can also store objects when working in OOP.<\/p>\n<h3>Conclusion<\/h3>\n<p>A singly linked list of a lot of use in Computer science. Its main application lies in the implementation of other data structures. Therefore, it is very important to have a good understanding of this data structure.<br \/>\nIn this article, we studied a singly linked list. In the upcoming articles, we will read about the other remaining types of lists.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>There are broadly two types of Data structures: Linear and Non-linear. Linear data structures are those in which every element is connected to the previous element and the elements are present at a single&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":81159,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3555],"tags":[3568,3569,3570,3571,3572,3573,3574,3575],"class_list":["post-81069","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-data-structure","tag-applications-of-linked-list","tag-basic-operations-on-linked-list","tag-insertion-in-a-linked-list","tag-linked-list","tag-linked-list-in-data-structure","tag-linked-list-vs-array","tag-properties-of-linked-list","tag-types-of-linked-lists"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Linked List in Data Structure - TechVidvan<\/title>\n<meta name=\"description\" content=\"Learn about Linked List ( commonly used linear data structure that consists of group of nodes in a sequence) &amp; its basic operations.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linked List in Data Structure - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"Learn about Linked List ( commonly used linear data structure that consists of group of nodes in a sequence) &amp; its basic operations.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-21T03:30:35+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Techvidvan-Linked-list-in-DS.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"10 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linked List in Data Structure - TechVidvan","description":"Learn about Linked List ( commonly used linear data structure that consists of group of nodes in a sequence) & its basic operations.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/","og_locale":"en_US","og_type":"article","og_title":"Linked List in Data Structure - TechVidvan","og_description":"Learn about Linked List ( commonly used linear data structure that consists of group of nodes in a sequence) & its basic operations.","og_url":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2021-06-21T03:30:35+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Techvidvan-Linked-list-in-DS.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"10 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Linked List in Data Structure","datePublished":"2021-06-21T03:30:35+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/"},"wordCount":1510,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Techvidvan-Linked-list-in-DS.jpg","keywords":["Applications of Linked List","Basic Operations on Linked List","Insertion in a Linked List","Linked List","linked list in Data Structure","Linked List vs Array","Properties of linked list","Types of linked lists"],"articleSection":["Data Structure Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/","url":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/","name":"Linked List in Data Structure - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Techvidvan-Linked-list-in-DS.jpg","datePublished":"2021-06-21T03:30:35+00:00","description":"Learn about Linked List ( commonly used linear data structure that consists of group of nodes in a sequence) & its basic operations.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Techvidvan-Linked-list-in-DS.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Techvidvan-Linked-list-in-DS.jpg","width":1200,"height":628,"caption":"Linked list in DS"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/linked-list-in-data-structure\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Linked List in Data Structure"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/81069","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=81069"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/81069\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/81159"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=81069"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=81069"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=81069"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}