[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-685722-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-685722-en":130,"doc-similar-685722":158},{"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":73,"head_meta":75,"extra_data":77,"updated_unix":79},105,"en","linked-list-basics-read-and-practice","Linked List Basics - read and practice","","Linked List Basics explains how to build and use linked lists through clear explanations, diagrams, sample code, and exercises. It contrasts linked lists with arrays, highlighting strengths and weaknesses in time, space, and implementation complexity. The material emphasizes pointers as the key concept behind linked-list algorithms and pointer-intensive code, and it directs readers to a companion practice set with problems of varying difficulty plus supporting resources on pointers, memory, and C essentials.",{"@graph":14,"@context":72},[15,34,55],{"@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/linked-list-basics-read-and-practice/685722/",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-basics-read-and-practice/685722.png","ImageObject",300,407,{"name":42,"@type":43},"Fishy","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-18","2026-11-07",true,{"@type":52,"interactionType":53,"userInteractionCount":33},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What is the main focus of Linked List Basics?","Question",{"text":62,"@type":63},"The document introduces fundamental linked list structures and techniques, using explanations, drawings, sample code, and exercises to teach how linked lists work and how to implement them.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"Why does the document compare linked lists with arrays?",{"text":67,"@type":63},"Linked lists and arrays are presented as similar collection-storage structures. The comparison helps readers understand the strengths and weaknesses of each in terms of time, space, and implementation concerns.",{"name":69,"@type":60,"acceptedAnswer":70},"What prerequisite knowledge does the audience section expect?",{"text":71,"@type":63},"The article assumes basic understanding of programming and pointers, and it uses C syntax for examples while avoiding C-specific details as much as possible.","https://schema.org",{"og:url":32,"og:type":74,"og:title":10,"og:site_name":45,"og:description":12},"article",{"robots":76,"canonical":32},"index,follow",{"doc_id":78,"site_id":7},685722,1794016978,{"code":4,"msg":81,"data":82},"success",[83,87,91,95,100,104,109,114,119,122,126],{"id":22,"doc_module":4,"doc_module_name":25,"category_name":84,"show_sort_weight":85,"slug":86},"Story & Novel",90,"story-novel",{"id":26,"doc_module":4,"doc_module_name":25,"category_name":88,"show_sort_weight":89,"slug":90},"Literature",80,"literature",{"id":33,"doc_module":4,"doc_module_name":25,"category_name":92,"show_sort_weight":93,"slug":94},"Exam",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":101,"doc_module":4,"doc_module_name":25,"category_name":29,"show_sort_weight":102,"slug":103},6,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":81,"data":131},{"doc_id":78,"user_id":132,"nickname":42,"user_avatar":133,"doc_module":4,"category_id":101,"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":33,"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":79,"read_time":144,"preview_page_count":30,"preview_urls":145},14431098389841,"https://eur-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Linked List Basics  \nBy Nick Parlante Copyright © 1998-2001, Nick Parlante  \nAbstract  \nThis document introduces the basic structures and techniques for building linked lists with a mixture of explanations, drawings, sample code, and exercises. The material is useful if you want to understand linked lists or if you want to see a realistic, applied example of pointer-intensive code. A separate document, Linked List Problems ([http://cslibrary.stanford.edu/105/](http://cslibrary.stanford.edu/105/)), presents 18 practice problems covering a wide range of difficulty.  \nLinked lists are useful to study for two reasons. Most obviously, linked lists are a data structure which you may want to use in real programs. Seeing the strengths and weaknesses of linked lists will give you an appreciation of the some of the time, space, and code issues which are useful to thinking about any data structures in general. Somewhat less obviously, linked lists are great way to learn about pointers. In fact, you may never use a linked list in a real program, but you are certain to use lots of pointers. Linked list problems are a nice combination of algorithms and pointer manipulation. Traditionally, linked lists have been the domain where beginning programmers get the practice to really understand pointers.  \nAudience  \nThe article assumes a basic understanding of programming and pointers. The article uses C syntax for its examples where necessary, but the explanations avoid C specifics as much as possible—really the discussion is oriented towards the important concepts of pointer manipulation and linked list algorithms.  \nOther Resources  \n• Link List Problems ([http://cslibrary.stanford.edu/105/](http://cslibrary.stanford.edu/105/)) Lots of linked list problems, with explanations, answers, and drawings. The \"problems\"article is a companion to this \"explanation\" article.  \n• Pointers and Memory ([http://cslibrary.stanford.edu/102/](http://cslibrary.stanford.edu/102/)) Explains all about how pointers and memory work. You need some understanding of pointers and memory before you can understand linked lists.  \n• Essential C ([http://cslibrary.stanford.edu/101/](http://cslibrary.stanford.edu/101/)) Explains all the basic features of the C programming language.  \nThis is document \\#103, Linked List Basics, in the Stanford CS Education Library. This and other free educational materials are available at [http://cslibrary.stanford.edu/. This](http://cslibrary.stanford.edu/. This)[ ](http://cslibrary.stanford.edu/. This)document is free to be used, reproduced, or sold so long as this notice is clearly reproduced at its beginning.  \n2  \nContents  \nSection 1—Basic List Structures and Code   2  \nSection 2—Basic List Building  11  \nSection 3—Linked List Code Techniques  17  \nSection 3—Code Examples   22  \nEdition  \nOriginally 1998 there was just one \"Linked List\" document that included a basic explanation and practice problems. In 1999, it got split into two documents: \\#103 (this document) focuses on the basic introduction, while \\#105 is mainly practice problems.  \nThis 4-12-2001 edition represents minor edits on the 1999 edition.  \nDedication  \nThis document is distributed for free for the benefit and education of all. That a person seeking knowledge should have the opportunity to find it. Thanks to Stanford and my boss Eric Roberts for supporing me in this project. Best regards, Nick--[nick.parlante@cs.stanford.edu](nick.parlante@cs.stanford.edu)  \nSection 1—  \nLinked List Basics  \nWhy Linked Lists?  \nLinked lists and arrays are similar since they both store collections of data. The terminology is that arrays and linked lists store \"elements\" on behalf of \"client\" code. The specific type of element is not important since essentially the same structure works to store elements of any type. One way to think about linked lists is to look at how arrays work and think about alternate approaches.  \nArray Review  \nArrays are probably the most common data structure us","cbCailiiSovDD3Fg","https://ap.wps.com/l/cbCailiiSovDD3Fg","pdf",46681,26,"English","# Contents\n## Section 1—Basic List Structures and Code\n## Section 2—Basic List Building\n## Section 3—Linked List Code Techniques\n## Section 3—Code Examples","[{\"question\":\"What is the main focus of Linked List Basics?\",\"answer\":\"The document introduces fundamental linked list structures and techniques, using explanations, drawings, sample code, and exercises to teach how linked lists work and how to implement them.\"},{\"question\":\"Why does the document compare linked lists with arrays?\",\"answer\":\"Linked lists and arrays are presented as similar collection-storage structures. The comparison helps readers understand the strengths and weaknesses of each in terms of time, space, and implementation concerns.\"},{\"question\":\"What prerequisite knowledge does the audience section expect?\",\"answer\":\"The article assumes basic understanding of programming and pointers, and it uses C syntax for examples while avoiding C-specific details as much as possible.\"}]","Linked List Basics - read and practice | PDF",66,[146,150,154],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/069585cda75bc35dd8f8e2993db3bc5b.webp",983,1272,{"page_no":26,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/8374b4838f4fc3c8639b287c9f65c891.webp",982,1270,{"page_no":30,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-09/76f3bd306910ba79231c0137bf1c5f3b.webp",981,1269,{"list":159,"token":11},[160,166,172,178,184,190,196,201,207,212],{"doc_id":161,"doc_title":162,"file_type":137,"home_preview_img_url":163,"slug":164,"view_count":30,"category_name":29,"create_tm":165},732874,"Unit11-Linked Lists","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031780339/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796118419&Signature=STJ4P4cEJQVQWQA1vqNuPlpJ9Tc%3D","unit11-linked-lists",1795382671,{"doc_id":167,"doc_title":168,"file_type":137,"home_preview_img_url":169,"slug":170,"view_count":96,"category_name":29,"create_tm":171},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=1796118419&Signature=Yws35i1RxGPlGWMjA9xSwifXIqI%3D","l6b-linked-list-variations-lecture-6b",1794017196,{"doc_id":173,"doc_title":174,"file_type":137,"home_preview_img_url":175,"slug":176,"view_count":33,"category_name":29,"create_tm":177},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=1796118419&Signature=V53O72NrHixOSjE3rP3bVOWG3ko%3D","lecture-17-linked-list-data-structure-part-ii-double-linked-list-applications-and-insertion",1795006749,{"doc_id":179,"doc_title":180,"file_type":137,"home_preview_img_url":181,"slug":182,"view_count":101,"category_name":29,"create_tm":183},685766,"Linked Lists - Fundamentals - Core Concepts and C++ Implementation Notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000198068/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796118419&Signature=9MY5dxpaeAeSu0jY4Zvtc2sKIu0%3D","linked-lists-fundamentals-core-concepts-and-c-implementation-notes",1794017949,{"doc_id":185,"doc_title":186,"file_type":137,"home_preview_img_url":187,"slug":188,"view_count":33,"category_name":29,"create_tm":189},732878,"Linked Lists - Overview - Advantages and Operations","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031780342/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796118419&Signature=BziUbJDF7Y6TuEiMd%2F4mUB2qmRM%3D","linked-lists-overview-advantages-and-operations",1795382677,{"doc_id":191,"doc_title":192,"file_type":137,"home_preview_img_url":193,"slug":194,"view_count":96,"category_name":29,"create_tm":195},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=1796118419&Signature=GaHTpLN6BMQLk9Quzer2Hnp%2BKDM%3D","linked-list-course-13004700-part-2",1794017631,{"doc_id":197,"doc_title":198,"file_type":137,"home_preview_img_url":199,"slug":200,"view_count":30,"category_name":29,"create_tm":189},732877,"Linked Data Structures - Linked Lists","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031413515/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796118419&Signature=CeL1eWDryM86%2BXjSsJqED5H1ld8%3D","linked-data-structures-linked-lists",{"doc_id":202,"doc_title":203,"file_type":137,"home_preview_img_url":204,"slug":205,"view_count":33,"category_name":29,"create_tm":206},732876,"Lecture 10 - Linked Lists - Lecture notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031413512/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796118419&Signature=IchwbmtahSX8CZ9E8hp0G%2FgLw%2Fg%3D","lecture-10-linked-lists-lecture-notes",1795382672,{"doc_id":208,"doc_title":209,"file_type":137,"home_preview_img_url":210,"slug":211,"view_count":96,"category_name":29,"create_tm":79},685721,"Sequences - Representing Sequences by Arrays and Linked Lists","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999688553/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796118419&Signature=aEFCQTfHDkDvHUkh032q9pNWb34%3D","sequences-representing-sequences-by-arrays-and-linked-lists",{"doc_id":213,"doc_title":214,"file_type":137,"home_preview_img_url":215,"slug":216,"view_count":30,"category_name":29,"create_tm":217},685724,"LINKED LISTS - Chapter 3 - overview","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000182527/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796118419&Signature=dnTlijoacSa1dkP%2Fk28CXCxkfvg%3D","linked-lists-chapter-3-overview",1794016986]