[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-685731-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-685731-en":130,"doc-similar-685731":154},{"code":4,"msg":5,"data":6},0,"ok",{"site_id":7,"language":8,"slug":9,"title":10,"keywords":11,"description":12,"schema_data":13,"social_meta":74,"head_meta":76,"extra_data":78,"updated_unix":80},105,"en","lecture-five-linked-list-structure","Lecture Five - Linked List Structure","","Lecture Five explains linked lists as linear data structures composed of connected nodes, where each node stores data and a reference (pointer) to the next node. It introduces HEAD for the first node and NULL for the end, then defines a C-style struct node using data and next. The lecture compares singly, doubly, and circular linked lists, provides memory allocation and linking examples, and details key operations including traversal, insertion (beginning/middle/end), and deletion strategies.",{"@graph":14,"@context":73},[15,34,56],{"@type":16,"itemListElement":17},"BreadcrumbList",[18,23,27,31],{"item":19,"name":20,"@type":21,"position":22},"https://docshare.wps.com","Home","ListItem",1,{"item":24,"name":25,"@type":21,"position":26},"https://docshare.wps.com/document/","Document",2,{"item":28,"name":29,"@type":21,"position":30},"https://docshare.wps.com/document/technology/","Technology",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/lecture-five-linked-list-structure/685731/",4,{"url":32,"name":10,"@type":35,"image":36,"author":41,"headline":10,"publisher":44,"fileFormat":47,"inLanguage":8,"description":12,"dateModified":48,"datePublished":49,"encodingFormat":47,"isAccessibleForFree":50,"interactionStatistic":51},"DigitalDocument",{"url":37,"@type":38,"width":39,"height":40},"https://docshare.wps.com/thumbnails/lecture-five-linked-list-structure/685731.png","ImageObject",300,407,{"name":42,"@type":43},"Finn","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-30","2026-11-07",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",7,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"What is a linked list and how are nodes connected?","Question",{"text":63,"@type":64},"A linked list is a linear structure of connected nodes. Each node stores data and a pointer to the next node, with HEAD marking the first node and NULL indicating the end.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What are the three common types of linked lists?",{"text":68,"@type":64},"The lecture covers singly linked lists (pointer to next), doubly linked lists (pointers to next and previous), and circular linked lists (last node links back to the first, singly or doubly).",{"name":70,"@type":61,"acceptedAnswer":71},"How do insertion and traversal work in a linked list?",{"text":72,"@type":64},"Traversal moves a temporary pointer through nodes until it reaches NULL, printing each node’s data. Insertion can add elements at the beginning, middle, or end by allocating a new node and rewiring pointers accordingly.","https://schema.org",{"og:url":32,"og:type":75,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":77,"canonical":32},"index,follow",{"doc_id":79,"site_id":7},685731,1794017204,{"code":4,"msg":82,"data":83},"success",[84,88,92,96,101,105,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":85,"show_sort_weight":86,"slug":87},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":89,"show_sort_weight":90,"slug":91},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":93,"show_sort_weight":94,"slug":95},"Exam",70,"exam",{"id":97,"doc_module":4,"doc_module_name":25,"category_name":98,"show_sort_weight":99,"slug":100},5,"Comic",60,"comic",{"id":102,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":103,"slug":104},6,50,"technology",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},"Healthcare",40,"healthcare",{"id":110,"doc_module":4,"doc_module_name":25,"category_name":111,"show_sort_weight":112,"slug":113},8,"Research & Report",30,"research-report",{"id":115,"doc_module":4,"doc_module_name":25,"category_name":116,"show_sort_weight":117,"slug":118},9,"Religion & Spirituality",20,"religion-spirituality",{"id":117,"doc_module":4,"doc_module_name":25,"category_name":120,"show_sort_weight":117,"slug":121},"World Cup","world-cup",{"id":123,"doc_module":4,"doc_module_name":25,"category_name":124,"show_sort_weight":123,"slug":125},10,"Lifestyle","lifestyle",{"id":127,"doc_module":4,"doc_module_name":25,"category_name":128,"show_sort_weight":97,"slug":129},19,"General","general",{"code":4,"msg":82,"data":131},{"doc_id":79,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":102,"category_name":29,"doc_title":10,"doc_description":12,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":55,"is_deleted":4,"is_public":22,"is_downloadable":22,"audit_status":22,"page_count":139,"language":140,"language_code":8,"site_id":7,"html_lang":8,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":12,"update_tm":80,"read_time":144,"preview_page_count":26,"preview_urls":145},34359740700684,"https://ap-avatar.wpscdn.com/avatar/1f400023980c374ae676?_k=1777273430885731487","Lecture Five: Linked List Structure  \nLinked List Data Structure  \nA linked list is a linear data structure that includes a series of connected nodes. Here, each node stores the data and the address of the next node. For example,  \nYou have to start somewhere, so we give the address of the first node a special name called HEAD. Also, the last node in the linked list can be identified because its next portion points to NULL.  \nWe wrap both the data item and the next node reference in a struct as:  \nstruct node {  \nint data;  \nstruct node *next; };  \nEach struct node has a data item and a pointer to another struct node.  \nTypes of Linked List  \nThere are three common types of Linked List.  \n1. Singly Linked List  \n2. Doubly Linked List  \n3. Circular Linked List  \nSingly Linked List  \nIt is the most common. Each node has data and a pointer to the next node.  \nNode is represented as:  \nstruct node {  \nint data;  \nstruct node *next; }  \n1  \nDoubly Linked List  \nWe add a pointer to the previous node in a doubly-linked list. Thus, we can go in either direction: forward or backward.  \nA node is represented as  \nstruct node {  \nint data;  \nstruct node *next;  \nstruct node *prev; }  \nCircular Linked List  \nA circular linked list is a variation of a linked list in which the last element is linked to the first element. This forms a circular loop.  \nA circular linked list can be either singly linked or doubly linked.  \n1. for singly linked list, next pointer of last item points to the first item  \n2. In the doubly linked list, prev pointer of the first item points to the last item as well.  \nExample  \none = malloc(sizeof(struct node));  \ntwo = malloc(sizeof(struct node));  \nthree = malloc(sizeof(struct node));  \n/* Save address of first node in head */  \nhead = one;  \n/* Assign data values */  \none- >data = 1;  \ntwo- >data = 2;  \nthree- >data=3;  \n/* Connect nodes */  \none- >next = two;  \ntwo- >next = three;  \nthree- >next = NULL;  \n2  \nLecture Five: Linked List Data Structure Data Structures  \nThe power of a linked list comes from the ability to break the chain and rejoin it. E.g. if you want to put an element 4 between 1 and 2, the steps would be:  \n1. Create a new struct node and allocate memory to it.  \n2. Add its data value as 4  \n3. Point its next pointer to the struct node containing 2 as the data value  \n4. Change the next pointer of \"1\" to the node we just created.  \nDoing something similar in an array would have required shifting the positions of all the subsequent elements.  \nLinked List Implementations in C++  \nLinked List Applications  \n1. Dynamic memory allocation  \n2. Implemented in stack and queue  \n3. In undo functionality of Software  \n4. Hash tables, Graphs  \nLinked List Operations: Traverse, Insert and Delete  \nThere are various linked list operations that allow us to perform different actions on linked lists. For example, the insertion operation adds a new element to the linked list:-  \n1. Traversal-access each element of the linked list  \n2. Insertion-adds a new element to the linked list  \n3. Deletion-removes the existing elements  \n4. Search-find a node in the linked list  \n5. Sort-sort the nodes of the linked list  \nThings to Remember about Linked List  \nhead points to the first node of the linked list  \nnext pointer of the next node, so if the next current node is NULL , we have reached the end of the linked list.  \n3  \nTraverse a Linked List  \nDisplaying the contents of a linked list is very simple. We keep moving the temp node to the next one and display its contents. When temp is NULL , we know that we have reached the end of the linked list so we get out of the while loop.  \nstruct node *temp = head;  \ncout\u003C\u003C“\\n\\nList elements are- \\n\";  \nwhile(temp != NULL) {  \ncout\u003C\u003C“   >\"\u003C\u003Ctemp- >data ;  \ntemp = temp- >next; }  \nThe output of this program will be:  \nList elements are-1   >2   >3   >  \nInsert Elements to a Linked List  \nYou can add elements to either the beginning, middle or end of the linked list.  \n1. Inse","cbCaivTAa9PJh6Oi","https://ap.wps.com/l/cbCaivTAa9PJh6Oi","pdf",1157879,15,"English","# Introduction\n# Linked List Structure\n## Types of Linked Lists\n# Linked List Implementations in C++\n## Linked List Applications\n## Linked List Operations: Traverse, Insert and Delete\n# Things to Remember about Linked List\n# Traverse a Linked List\n# Insert Elements to a Linked List\n## Insert at the beginning\n## Insert at the end\n## Insert at the middle\n# Delete from a Linked List","[{\"question\":\"What is a linked list and how are nodes connected?\",\"answer\":\"A linked list is a linear structure of connected nodes. Each node stores data and a pointer to the next node, with HEAD marking the first node and NULL indicating the end.\"},{\"question\":\"What are the three common types of linked lists?\",\"answer\":\"The lecture covers singly linked lists (pointer to next), doubly linked lists (pointers to next and previous), and circular linked lists (last node links back to the first, singly or doubly).\"},{\"question\":\"How do insertion and traversal work in a linked list?\",\"answer\":\"Traversal moves a temporary pointer through nodes until it reaches NULL, printing each node’s data. Insertion can add elements at the beginning, middle, or end by allocating a new node and rewiring pointers accordingly.\"}]","Lecture Five - Linked List Structure | PDF",38,[146,150],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/400df0fef652848566c8d795563d697f.webp",983,1272,{"page_no":26,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/7667e5c42a1f555b02d1952ccc428aba.webp",982,1270,{"list":155,"token":11},[156,162,168,174,180,186,192,197,203,209],{"doc_id":157,"doc_title":158,"file_type":137,"home_preview_img_url":159,"slug":160,"view_count":30,"category_name":29,"create_tm":161},732873,"Singly Linked Lists in C - Introduction and Traversal Example","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031413508/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=aiHC5ieA60wPK9SHR0ffCqIoeW0%3D","singly-linked-lists-in-c-introduction-and-traversal-example",1795382670,{"doc_id":163,"doc_title":164,"file_type":137,"home_preview_img_url":165,"slug":166,"view_count":97,"category_name":29,"create_tm":167},685726,"L6b - Linked List Variations - Lecture 6b","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000185855/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=cyah91ewrAIZwwhrphvMUYq%2BYOg%3D","l6b-linked-list-variations-lecture-6b",1794017196,{"doc_id":169,"doc_title":170,"file_type":137,"home_preview_img_url":171,"slug":172,"view_count":33,"category_name":29,"create_tm":173},719604,"Lecture 17 - Linked List Data Structure (Part-II) - Double Linked List - Applications and Insertion","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230023515168/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=WMbTe9Qmi%2FswlXaThiJV2MuxGCk%3D","lecture-17-linked-list-data-structure-part-ii-double-linked-list-applications-and-insertion",1795006749,{"doc_id":175,"doc_title":176,"file_type":137,"home_preview_img_url":177,"slug":178,"view_count":97,"category_name":29,"create_tm":179},685716,"Linked Lists - Introduction - Properties, Advantages, Disadvantages, and Types","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999688533/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=evgUSj7gHf4miXp%2FzO9l47PWgYE%3D","linked-lists-introduction-properties-advantages-disadvantages-and-types",1794016969,{"doc_id":181,"doc_title":182,"file_type":137,"home_preview_img_url":183,"slug":184,"view_count":55,"category_name":29,"create_tm":185},697943,"Lecture 12 Doubly Linked Lists - (with Recursion)","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230009212198/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=KVdV5MXDLfSrtye0dPJJ2bjIPgg%3D","lecture-12-doubly-linked-lists-with-recursion",1794446071,{"doc_id":187,"doc_title":188,"file_type":137,"home_preview_img_url":189,"slug":190,"view_count":97,"category_name":29,"create_tm":191},685762,"Linked List - Course 13004700 Part-2","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999691129/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=jK2tAKMHRckPrfhTux%2FhMvButgM%3D","linked-list-course-13004700-part-2",1794017631,{"doc_id":193,"doc_title":194,"file_type":137,"home_preview_img_url":195,"slug":196,"view_count":33,"category_name":29,"create_tm":167},685727,"Circular Linked Lists - All Operations and Complexity Analysis","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000185859/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=WLKvPteSlZiSAG43CDYWWGP5YRM%3D","circular-linked-lists-all-operations-and-complexity-analysis",{"doc_id":198,"doc_title":199,"file_type":137,"home_preview_img_url":200,"slug":201,"view_count":97,"category_name":29,"create_tm":202},685741,"ROHINI COLLEGE OF ENGINEERING & TECHNOLOGY - Linked list implementation - Singly linked lists - Core algorithms for traversal, counting, searching and insertion","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000186201/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=eUS5qZmrsZeOvQYSscOQa7khHK4%3D","rohini-college-of-engineering-technology-linked-list-implementation-singly-linked-lists-core-algorithms-for-traversal-counting-searching-and-insertion",1794017223,{"doc_id":204,"doc_title":205,"file_type":137,"home_preview_img_url":206,"slug":207,"view_count":97,"category_name":29,"create_tm":208},685667,"Implementing Singly Linked List in C++ - struct and pointers","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000175839/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=ktM2vr7hT%2FWkz1uiWjOlNYs3%2BeM%3D","implementing-singly-linked-list-in-c-struct-and-pointers",1794016535,{"doc_id":210,"doc_title":211,"file_type":137,"home_preview_img_url":212,"slug":213,"view_count":97,"category_name":29,"create_tm":214},685730,"Chapter 4 Linked Lists - 4.1 Singly Linked Lists Or Chains","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000185878/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=eCteKXgRQmxhCYsGpIVUP%2BCDoIo%3D","chapter-4-linked-lists-41-singly-linked-lists-or-chains",1794017203]