[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-719605-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-719605-en":130,"doc-similar-719605":161},{"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-lists-lecture-notes","Linked Lists - lecture notes","","Lecture notes on linked lists in an object-oriented programming course, covering the core idea of nodes and how links define different linked data structures. Explains dynamic data structures using ArrayList as a comparison point, then details singly linked lists including head and next pointers. Provides algorithms for adding elements, searching for an item, inserting nodes, and computing list length, each with stated postconditions. Concludes with generic linked lists via type parameters, replacing Object with E in the implementation.",{"@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-lists-lecture-notes/719605/",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-lists-lecture-notes/719605.png","ImageObject",300,407,{"name":42,"@type":43},"Blue Pony","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-23","2026-11-18",true,{"@type":52,"interactionType":53,"userInteractionCount":26},"InteractionCounter",{"@type":54},"ViewAction",{"@type":56,"mainEntity":57},"FAQPage",[58,64,68],{"name":59,"@type":60,"acceptedAnswer":61},"What is the core concept behind linked data structures?","Question",{"text":62,"@type":63},"Linked data structures are built from nodes where each node holds a data item and links to other nodes. The type of links determines the kind of structure, such as singly linked lists or doubly linked lists.","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"How do you add an element to a singly linked list?",{"text":67,"@type":63},"Create a new node, set its next reference to the current head, then update the head reference to point to the new node.",{"name":69,"@type":60,"acceptedAnswer":70},"How does the search algorithm determine the result in a linked list?",{"text":71,"@type":63},"It iterates while the current node is not null and no match is found. The postcondition is that the algorithm returns the node containing the query item, or null if the item is not in the list.","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},719605,1795006752,{"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":26,"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":33,"preview_urls":145},962090760266,"https://ap-avatar.wpscdn.com/davatar_276721f389ce27ea32af1340a28f341c","Introduction to Object-Oriented Programming  \nLinked Lists  \nChristopher Simpkins [chris.simpkins@gatech.edu](chris.simpkins@gatech.edu)  \n CS 1331 (Georgia Tech)  Linked Lists  1 / 13   \nLinked Lists  \n Dynamic data structures  \n Singly linked lists  \n Generic linked lists  \n Doubly linked lists  \n CS 1331 (Georgia Tech)  Linked Lists  2 / 13   \nDynamic Data Structures  \n ArrayList was our ﬁrst dynamically-allocated data structure.  \n ArrayList is a hybrid static and dynamically allocated data structure.  \n ArrayList automatically allocates a larger backing (static) array when the capacity of its current backing array is exceeded.  \n In a purely dynamic data structure, storage for each new element is allocated when the element is added.  \n A purely dynamically allocated data structure is (slightly) more space efﬁcient, but slower because heap allocation occurs everytime an element is added.  \n CS 1331 (Georgia Tech)  Linked Lists  3 / 13   \nLinked Data Structures  \nThe core concept in a linked data structures is the node.  \n A data structure is a collection of nodes linked in a particular way.  \n A node holds a data item and links to other nodes.  \n The nature of the links determines the kind of data structure, e.g. , singly linked list, doubly linked list, binary tree, etc.  \nHere is a depiction of a node for a singly linked list and code that implements such a node (public members for brevity)  \nprivate class Node { public Object data;  \npublic Node next;  \npublic Node(Object data, Node next) { [this](this.data = data)[.data = data](this.data = data);  \n[this](this.next = next)[.next = next](this.next = next);}  \n}  \nCS 1331 (Georgia Tech)  Linked Lists  4 / 13   \nSingly Linked Lists  \nA singly linked list  \n Contains a pointer to a “head” node (null if empty) .  \n The head node's next points to the second node, the second node's next points to the third node, and so on.  \n The next reference of the last node is null  \nHere's a depiction of the nodes in a singly linked list with three elements:  \nCS 1331 (Georgia Tech)  Linked Lists  5 / 13   \nAdding Elements to a Singly Linked List  \n1. Create a new Node.  \n2. Set the next reference of the new Node to the current head.  \n3. Set the head reference to the new Node  \nSee [LinkedList.java](LinkedList.java) for the code.        \n CS 1331 (Georgia Tech)  Linked Lists  6 / 13   \nFinding an Item in a Linked List  \nAn algorithm for ﬁnding an item in a linked list:  \nfoundNode: Node := null  \ncurrentNode: Node := LinkedList .head  \nwhile currentNode != null && foundNode = null if [currentNode.data = queryItem](currentNode.data = queryItem)  \nfoundNode := currentNode [currentNode := currentNode.next](currentNode := currentNode.next)  \nThe postcondition of this algorithm is that foundNode will be:  \n The node containing the query item, or  \n null if the query item is not in the list.  \n CS 1331 (Georgia Tech)  Linked Lists  7 / 13   \nInserting Elements into a Linked List  \n1. Find the existing Node to insert new element after.  \n2. Create a new Node  \n3. Set the next reference of the new Node to the next reference of the existing node  \n4. Set the next reference of the existing node to the new Node.  \nSee [LinkedList.java](LinkedList.java) for the code.        \n CS 1331 (Georgia Tech)  Linked Lists  8 / 13   \nComputing the Length of a Linked List  \nAn algorithm for computing the length a linked list:  \nlength: int := 0  \ncurrentNode: Node := LinkedList .head while currentNode != null  \nlength := length + 1  \n[currentNode := currentNode.next](currentNode := currentNode.next)  \nThe postcondition of this algorithm is that length will be equal to the number of nodes in the list.  \n CS 1331 (Georgia Tech)  Linked Lists  9 / 13   \nGeneric Linked Lists  \nTo make our LinkedList generic we only need to add a type parameter to the declaration:  \npublic class GenericLinkedList\u003CE> { . . .  \nand replace Object with E in the body of the class. [See](See GenericLinkedList.java)[ ](See GenericLinkedL","cbCaifq0q9fC9lj2","https://ap.wps.com/l/cbCaifq0q9fC9lj2","pdf",224762,13,"English","# Linked Lists\n## Dynamic data structures\n## Linked data structures\n## Singly linked lists\n## Adding elements to a singly linked list\n## Finding an item in a linked list\n## Inserting elements into a linked list\n## Computing the length of a linked list\n## Generic linked lists","[{\"question\":\"What is the core concept behind linked data structures?\",\"answer\":\"Linked data structures are built from nodes where each node holds a data item and links to other nodes. The type of links determines the kind of structure, such as singly linked lists or doubly linked lists.\"},{\"question\":\"How do you add an element to a singly linked list?\",\"answer\":\"Create a new node, set its next reference to the current head, then update the head reference to point to the new node.\"},{\"question\":\"How does the search algorithm determine the result in a linked list?\",\"answer\":\"It iterates while the current node is not null and no match is found. The postcondition is that the algorithm returns the node containing the query item, or null if the item is not in the list.\"}]","Linked Lists - lecture notes | PDF",33,[146,150,153,157],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/5be0f6493c7c103d2a74f6245e56e348.webp",983,736,{"page_no":26,"url":151,"width":152,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/71cdeaba695e0385cdae92990471e103.webp",982,{"page_no":30,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/babf4606ae2ba37155f275eb3e7046d8.webp",981,735,{"page_no":33,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-18/6df93ace230b7818f01c75365b51f201.webp",980,734,{"list":162,"token":11},[163,169,175,181,187,193,199,205,211,217],{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":96,"category_name":29,"create_tm":168},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":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":105,"category_name":29,"create_tm":174},685760,"CS62 Class 8 - Linked lists - Basic Data Structures","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000192614/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=FTE1yqlet7ErMC3OQEemIAQoeYQ%3D","cs62-class-8-linked-lists-basic-data-structures",1794017629,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":96,"category_name":29,"create_tm":180},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":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":33,"category_name":29,"create_tm":186},697936,"Lecture 11 - Doubly Linked Lists","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010136454/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=0Tj7yUyqUIBXuoAbpBOt7ZPeTOA%3D","lecture-11-doubly-linked-lists",1794446060,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":96,"category_name":29,"create_tm":192},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":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":96,"category_name":29,"create_tm":198},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":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":33,"category_name":29,"create_tm":204},685736,"Singly Linked List in C - C Program - Linked List Operations Menu","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000186160/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=YBwT8WI6zvH3SWnhA0tsEKjda4s%3D","singly-linked-list-in-c-c-program-linked-list-operations-menu",1794017213,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":105,"category_name":29,"create_tm":210},685731,"Lecture Five - Linked List Structure","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999689386/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=6LBqbwvYA2WebmWgoN%2B%2Ff0P6jG8%3D","lecture-five-linked-list-structure",1794017204,{"doc_id":212,"doc_title":213,"file_type":137,"home_preview_img_url":214,"slug":215,"view_count":96,"category_name":29,"create_tm":216},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":218,"doc_title":219,"file_type":137,"home_preview_img_url":220,"slug":221,"view_count":26,"category_name":29,"create_tm":222},719606,"Linked Lists - Data Structures and Algorithms in Java","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230023515214/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=L8COI743hfpO7B02Ngg6j1ztL%2FM%3D","linked-lists-data-structures-and-algorithms-in-java",1795006758]