[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-697956-105":3,"detail-sidebar-cat-0-en-105":81,"doc-detail-697956-en":130,"doc-similar-697956":162},{"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","linked-list-lecture-23-24-notes","Linked List - Lecture 23-24 - Notes","","Lecture notes explain the concept of a linked list as an alternative to arrays, focusing on how lists can be represented using nodes that contain both data and a pointer/link to the next node. The notes contrast array limitations such as fixed size, shifting during insert/delete, and wasted space with linked lists. They further define self-referential structures, show C-like struct definitions, describe NULL as the list terminator, and walk through chaining nodes while determining the resulting data and next->data values in the list.",{"@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/exam/","Exam",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/linked-list-lecture-23-24-notes/697956/",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/linked-list-lecture-23-24-notes/697956.png","ImageObject",300,407,{"name":42,"@type":43},"Helloiii","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-24","2026-11-12",true,{"@type":52,"interactionType":53,"userInteractionCount":55},"InteractionCounter",{"@type":54},"ViewAction",6,{"@type":57,"mainEntity":58},"FAQPage",[59,65,69],{"name":60,"@type":61,"acceptedAnswer":62},"Why are linked lists used instead of arrays?","Question",{"text":63,"@type":64},"Arrays require a fixed size at the beginning, and insertions or deletions may force shifting elements. Linked lists avoid contiguous memory requirements and represent sequence through pointers between nodes.","Answer",{"name":66,"@type":61,"acceptedAnswer":67},"What fields does a linked list node contain?",{"text":68,"@type":64},"Each node contains one field for data and another field that stores the address (pointer) of the next node in the list.",{"name":70,"@type":61,"acceptedAnswer":71},"What does NULL represent in a linked list?",{"text":72,"@type":64},"NULL denotes the end of the list, meaning there is no successor node after the last element.","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},697956,1794446335,{"code":4,"msg":82,"data":83},"success",[84,88,92,95,100,104,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":29,"show_sort_weight":93,"slug":94},70,"exam",{"id":96,"doc_module":4,"doc_module_name":25,"category_name":97,"show_sort_weight":98,"slug":99},5,"Comic",60,"comic",{"id":55,"doc_module":4,"doc_module_name":25,"category_name":101,"show_sort_weight":102,"slug":103},"Technology",50,"technology",{"id":105,"doc_module":4,"doc_module_name":25,"category_name":106,"show_sort_weight":107,"slug":108},7,"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":96,"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":33,"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":33,"preview_urls":145},5909897196768,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","Linked List   \n1  \nList  \n􀀁 A list refers to a sequence of data items  \n􀀂 Example: An array  \n􀀁 The array index is used for accessing and manipulation of array elements  \n􀀂 Problems with arrays  \n􀀁 The array size has t o be specified at the beginning (at least during dynamic allocation)  \n􀀂 realloc can be used to readjust size in middle, but contiguous chunk of memory may not be available  \n􀀁 Deleting an element or inserting an element may require shifting of elements  \n􀀁 Wasteful of space  \nLinked List  \n􀀁 A completely different way to represent a list  \n􀀂 Make each data in the list part of a structure  \n􀀂 The structure also contains a pointer or link to the structure (of the same type) containing the next data  \n􀀂 This type of list is called a linked list  \nStructure 1  \nStructure 2  \nStructure 3  \nForming a linked list  \n􀀁 Let each structure of the list (lets call it node) have two fields:  \n􀀂 One containing the data  \n􀀂 The other containing the address of the structure holding the next data in the list  \n􀀁 The structures in the linked list need not be contiguous in memory  \n􀀂 They are ordered by logical links that are stored as part of the data in the structure itself  \n􀀂 The link is a pointer to another structure of the same type  \nContd.  \n􀀁 struct node  \n{ node  \nint data;  \ndata next  \nstruct node *next;  \n}  \n􀀁 The pointer variable next contains either the address of the location in memory of the successor list element or the special value NULL defined as 0  \n􀀂 NULL is used to denote the end of the list (no successor element)  \n􀀁 Such structures which contain a member field pointing to the same structure type are called selfreferential structures  \n5  \nExample: nodes of the list  \nstruct node a, b, c;  \n[a.data = 1](a.data = 1) ;  \n[b.data = 2](b.data = 2) ;  \nc.data = 3;  \n[a.next = b.next = c.next = NULL](a.next = b.next = c.next = NULL);  \na  \n\n| 1 | NULL |\n| --- | --- |\n\ndata  \nnext  \nb  \n\n| 2 |  |\n| --- | --- |\n\nNULL  \ndata next  \nc  \n\n| 3 | NULL |\n| --- | --- |\n\ndata  \nnext  \nChaining these together  \n[a.next = &b](a.next = &b) ;  \n[b.next = &c](b.next = &c) ;  \na b c  \n1  2  3 NULL  \ndata next data next data next  \nWhat are the values of :  \n• [a.next-](a.next-) >data  \n• [a.next-](a.next-) >next->data  \nChaining these together  \n[a.next = &b](a.next = &b) ;  \n[b.next = &c](b.next = &c) ;  \na b c  \n1  2  3 NULL  \ndata next data next data next  \nWhat are the values of :• [a.next-](a.next-) >data 2  \n• [a.next-](a.next-) >next->data 3  \nLinked Lists  \n􀀁 A singly linked list is a data structure consisting of a sequence of nodes  \n􀀁 Each node stores  \n􀀂 data  \n􀀂 link to the next node  \nNULL  \nContd.  \n􀀁 A head pointer addresses the first element of the list  \n􀀁 Each element points at a successor element  \n􀀁 The last element has a link value NULL  \nhead  \nNULL","cbCaibJwpITRYjUH","https://ap.wps.com/l/cbCaibJwpITRYjUH","pdf",153907,39,"English","# Linked List\n## Arrays vs linked lists\n## Node structure and self-referential structures\n## Forming a linked list\n## Example chaining and value tracing\n## Singly linked list overview","[{\"question\":\"Why are linked lists used instead of arrays?\",\"answer\":\"Arrays require a fixed size at the beginning, and insertions or deletions may force shifting elements. Linked lists avoid contiguous memory requirements and represent sequence through pointers between nodes.\"},{\"question\":\"What fields does a linked list node contain?\",\"answer\":\"Each node contains one field for data and another field that stores the address (pointer) of the next node in the list.\"},{\"question\":\"What does NULL represent in a linked list?\",\"answer\":\"NULL denotes the end of the list, meaning there is no successor node after the last element.\"}]","Linked List - Lecture 23-24 - Notes | PDF",98,[146,150,154,158],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/5b114d0cf5f7975451b63a02fce0b4c9.webp",983,759,{"page_no":26,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/95c36ff7399ecaa45c2e8c5a478ec645.webp",982,758,{"page_no":30,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/0aaa0f1ce272bf6e86a6f759cd52dae7.webp",981,757,{"page_no":33,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/4bff51c11bda4002d0d95d34a1f758a1.webp",980,756,{"list":163,"token":11},[164,170,176,182,188,194,201,207,214,220],{"doc_id":165,"doc_title":166,"file_type":137,"home_preview_img_url":167,"slug":168,"view_count":123,"category_name":29,"create_tm":169},685768,"CS 2351 Data Structures - Linked Lists","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000198125/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796166959&Signature=5Pj6aCPMyAv3EatnM%2BHlyH7HTb8%3D","cs-2351-data-structures-linked-lists",1794017950,{"doc_id":171,"doc_title":172,"file_type":137,"home_preview_img_url":173,"slug":174,"view_count":123,"category_name":29,"create_tm":175},685729,"Chapter 14 Linked Lists - Chapter 14 - Operations and Implementations of Singly Linked Lists","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000185871/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796166959&Signature=EySTvfET46NnyPpTVxThySw9IpM%3D","chapter-14-linked-lists-chapter-14-operations-and-implementations-of-singly-linked-lists",1794017196,{"doc_id":177,"doc_title":178,"file_type":137,"home_preview_img_url":179,"slug":180,"view_count":115,"category_name":29,"create_tm":181},685668,"C++ Linked Lists - Review - List Operations and Traversal","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000175845/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796166959&Signature=NjrCF71xLlPvfzyeTj0ZwUK0U1c%3D","c-linked-lists-review-list-operations-and-traversal",1794016536,{"doc_id":183,"doc_title":184,"file_type":137,"home_preview_img_url":185,"slug":186,"view_count":110,"category_name":29,"create_tm":187},685761,"Singly-Linked List Class - Exam 1 - Review and HW5 Card Game Efficiency","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999691124/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796166959&Signature=NoxPSMP2pCFhnTT8o9B%2BxbUy%2B%2FY%3D","singly-linked-list-class-exam-1-review-and-hw5-card-game-efficiency",1794017629,{"doc_id":189,"doc_title":190,"file_type":137,"home_preview_img_url":191,"slug":192,"view_count":30,"category_name":29,"create_tm":193},732882,"Linked Lists in MIPS - MIPS Implementation, Recursive Functions, ISA and x86 vs MIPS Comparison","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031413521/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796166959&Signature=lXQoIAaMq1jH945THcYdVOyCEVs%3D","linked-lists-in-mips-mips-implementation-recursive-functions-isa-and-x86-vs-mips-comparison",1795382683,{"doc_id":195,"doc_title":196,"file_type":137,"home_preview_img_url":197,"slug":198,"view_count":199,"category_name":29,"create_tm":200},391235,"C Language Questions and Answers - Study & Interview Quick Reference","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917369724/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796166959&Signature=12bGjwnlxrFo2K68j22TkPRQ5OA%3D","c-language-questions-and-answers-study-interview-quick-reference",17,1790350259,{"doc_id":202,"doc_title":203,"file_type":137,"home_preview_img_url":204,"slug":205,"view_count":117,"category_name":29,"create_tm":206},391927,"Amazon Interview Questions for Freshers - Technical and HR Interview Questions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917410488/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796166959&Signature=DrvLMgHAOplFt2tjDS%2F1NVgRNmI%3D","amazon-interview-questions-for-freshers-technical-and-hr-interview-questions",1790360401,{"doc_id":208,"doc_title":209,"file_type":137,"home_preview_img_url":210,"slug":211,"view_count":212,"category_name":29,"create_tm":213},391265,"HCL Placement Papers - Section II-C Programming - C Questions","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229917371012/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796166959&Signature=Ae448ZmDEyzN9lWL1Tlvo%2BDJmAI%3D","hcl-placement-papers-section-ii-c-programming-c-questions",11,1790350498,{"doc_id":215,"doc_title":216,"file_type":137,"home_preview_img_url":217,"slug":218,"view_count":33,"category_name":29,"create_tm":219},697947,"Linked List in Python - Lecture 4 - Implementation","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010140976/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796166959&Signature=aK79fyW7AMLk4Hge3DWp6e40zjs%3D","linked-list-in-python-lecture-4-implementation",1794446273,{"doc_id":221,"doc_title":222,"file_type":137,"home_preview_img_url":223,"slug":224,"view_count":30,"category_name":29,"create_tm":225},727274,"Data Structures Using Python - (R20A0503) Lecture Notes - B.TECH II Year I-Sem (R20)","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230029071315/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796166959&Signature=MKeJ4sPGipKEVmMiYh0PtcKIjMI%3D","data-structures-using-python-r20a0503-lecture-notes-btech-ii-year-i-sem-r20",1795232719]