[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-782743-105":59,"doc-detail-782743-en":129,"doc-similar-782743":167},{"code":4,"msg":5,"data":6},0,"success",[7,13,18,23,28,33,38,43,48,51,55],{"id":8,"doc_module":4,"doc_module_name":9,"category_name":10,"show_sort_weight":11,"slug":12},1,"Document","Story & Novel",90,"story-novel",{"id":14,"doc_module":4,"doc_module_name":9,"category_name":15,"show_sort_weight":16,"slug":17},2,"Literature",80,"literature",{"id":19,"doc_module":4,"doc_module_name":9,"category_name":20,"show_sort_weight":21,"slug":22},4,"Exam",70,"exam",{"id":24,"doc_module":4,"doc_module_name":9,"category_name":25,"show_sort_weight":26,"slug":27},5,"Comic",60,"comic",{"id":29,"doc_module":4,"doc_module_name":9,"category_name":30,"show_sort_weight":31,"slug":32},6,"Technology",50,"technology",{"id":34,"doc_module":4,"doc_module_name":9,"category_name":35,"show_sort_weight":36,"slug":37},7,"Healthcare",40,"healthcare",{"id":39,"doc_module":4,"doc_module_name":9,"category_name":40,"show_sort_weight":41,"slug":42},8,"Research & Report",30,"research-report",{"id":44,"doc_module":4,"doc_module_name":9,"category_name":45,"show_sort_weight":46,"slug":47},9,"Religion & Spirituality",20,"religion-spirituality",{"id":46,"doc_module":4,"doc_module_name":9,"category_name":49,"show_sort_weight":46,"slug":50},"World Cup","world-cup",{"id":52,"doc_module":4,"doc_module_name":9,"category_name":53,"show_sort_weight":52,"slug":54},10,"Lifestyle","lifestyle",{"id":56,"doc_module":4,"doc_module_name":9,"category_name":57,"show_sort_weight":24,"slug":58},19,"General","general",{"code":4,"msg":60,"data":61},"ok",{"site_id":62,"language":63,"slug":64,"title":65,"keywords":66,"description":67,"schema_data":68,"social_meta":122,"head_meta":124,"extra_data":126,"updated_unix":128},105,"en","linked-list-ch-4-fundamentals","Linked List - Ch 4 - Fundamentals","","Linked lists are sequences of connected elements in which each node stores data and a link to the next. The slides distinguish singly, doubly, and circular lists; explain null termination; and introduce IntNode declarations, with head and tail references used to track list boundaries and represent an empty list. Diagrams clarify node connections. The programming questions address efficient retrieval of the mth-to-last element and cycle detection without modifying the list, applying these structures to core algorithmic reasoning in CS272.",{"@graph":69,"@context":121},[70,84,104],{"@type":71,"itemListElement":72},"BreadcrumbList",[73,77,79,82],{"item":74,"name":75,"@type":76,"position":8},"https://docshare.wps.com","Home","ListItem",{"item":78,"name":9,"@type":76,"position":14},"https://docshare.wps.com/document/",{"item":80,"name":30,"@type":76,"position":81},"https://docshare.wps.com/document/technology/",3,{"item":83,"name":65,"@type":76,"position":19},"https://docshare.wps.com/document/linked-list-ch-4-fundamentals/782743/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":98,"encodingFormat":97,"isAccessibleForFree":99,"interactionStatistic":100},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/linked-list-ch-4-fundamentals/782743.png","ImageObject",300,407,{"name":92,"@type":93},"404brain","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-12-03",true,{"@type":101,"interactionType":102,"userInteractionCount":14},"InteractionCounter",{"@type":103},"ViewAction",{"@type":105,"mainEntity":106},"FAQPage",[107,113,117],{"name":108,"@type":109,"acceptedAnswer":110},"What is a linked list?","Question",{"text":111,"@type":112},"It is a sequence of elements connected by links. Each node stores an element and a link to the next element.","Answer",{"name":114,"@type":109,"acceptedAnswer":115},"How does a linked list represent its end and an empty list?",{"text":116,"@type":112},"A null reference marks the final node’s link. An empty list is represented by storing null in the head reference.",{"name":118,"@type":109,"acceptedAnswer":119},"What programming problems are posed in the slides?",{"text":120,"@type":112},"The questions ask how to find the mth-to-last element efficiently and how to determine whether a list is cyclic without modifying it.","https://schema.org",{"og:url":83,"og:type":123,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":125,"canonical":83},"index,follow",{"doc_id":127,"site_id":62},782743,1796313771,{"code":4,"msg":5,"data":130},{"doc_id":127,"user_id":131,"nickname":92,"user_avatar":132,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":133,"file_id":134,"file_url":135,"file_type":136,"file_size":137,"view_count":14,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":138,"language":139,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":140,"faqs":141,"seo_title":142,"seo_description":67,"update_tm":128,"read_time":143,"preview_page_count":29,"preview_urls":144},1099529839291,"https://ap-avatar.wpscdn.com/davatar_6f874abed73319feea01a86fa6f0fab8","Linked Lists  \nRead Chapter 4  \nCS272, Huiping Cao 1  \nQuestions  \n• Given a singly linked list, devise a time-and space-efficient algorithm to find the mth-to-last element of the list. Implement your algorithm, taking care to handle relevant error conditions . Define mth to last such that m=0, the last element of the list is returned.  \n• You are given a linked list that is either NULL-terminated (acyclic), or ends in a cycle (cyclic), write a function that takes a pointer to the head of a list and determines if the list is cyclic or acyclic . Your function should return 0 if the list is acyclic and 1 if it is cyclic. You may not modify the list in anyway.  \nCS272, Huiping Cao 2  \nLinked list  \n• Singly linked list  \n• Doubly linked list  \n– With dummy nodes  \n• Circularly linked list  \nCS272, Huiping Cao 3  \nLinked List  \n• Linked List  \n– A sequence of elements arranged one after another  \n– Each element connected to the next by a “link”  \n• Node  \n– Element  \n– Link to the next element  \n– Last node  \n\n| 12 |  |\n| --- | --- |\n\n| 28 |  |\n| --- | --- |\n\n| 0 |  |\n| --- | --- |\n\n| 34 | end |\n| --- | --- |\n\nCS272, Huiping Cao 4  \nDeclarations for Linked Lists  \n• Each node in the linked list is a class, as shown here .  \npublic class IntNode  \n{  \nprivate int data;  \nprivate IntNode link;  \n...  \n}  \n\n| 12 |  |\n| --- | --- |\n\n| 28 |  |\n| --- | --- |\n\n| 0 |  |\n| --- | --- |\n\n| 34 | end |\n| --- | --- |\n\nCS272, Huiping Cao 5  \nList end  \n• null reference used as the final node of a linked list  \n\n| 12 |  |\n| --- | --- |\n\n| 28 |  |\n| --- | --- |\n\n| 0 |  |\n| --- | --- |\n\n| 34 | null |\n| --- | --- |\n\nCS272, Huiping Cao 6  \nHow to access a linked list?  \nCS272, Huiping Cao 7  \nDeclarations for Linked Lists  \n• A program can keep track of the front node by using an IntNode reference variable head.  \n– Notice that head is not an IntNode-- it is a reference to an IntNode .  \nCS272, Huiping Cao 8  \nDeclarations for Linked Lists  \n• A program can keep track of the front node by using an IntNode reference variable head.  \n– Notice that head is not an IntNode-- it is a reference to an IntNode .  \n• We represent the empty list by storing null in the head reference .  \nhead  \nCS272, Huiping Cao 9  \nDeclarations for Linked Lists  \n• A program can keep track of  \n– the front node by using an IntNode reference variable head.  \n– the last node by using an IntNode reference variable tail.  \nhead  \ntail  \n| 12 |  |\n| --- | --- |\n\n| 28 |  |\n| --- | --- |\n\n| 0 |  |\n| --- | --- |\n\n| 34 | null |\n| --- | --- |\n\nCS272, Huiping Cao 10","cbCaiuPqrvMNWruo","https://ap.wps.com/l/cbCaiuPqrvMNWruo","pdf",434300,53,"English","# Questions\n# Linked list\n# Declarations for Linked Lists\n# List end\n# How to access a linked list?","[{\"question\":\"What is a linked list?\",\"answer\":\"It is a sequence of elements connected by links. Each node stores an element and a link to the next element.\"},{\"question\":\"How does a linked list represent its end and an empty list?\",\"answer\":\"A null reference marks the final node’s link. An empty list is represented by storing null in the head reference.\"},{\"question\":\"What programming problems are posed in the slides?\",\"answer\":\"The questions ask how to find the mth-to-last element efficiently and how to determine whether a list is cyclic without modifying it.\"}]","Linked List - Ch 4 - Fundamentals | PDF",134,[145,149,152,156,160,164],{"page_no":8,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-03/b94160d570beaec6c34fc7808e324720.webp",983,736,{"page_no":14,"url":150,"width":151,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-03/a2af15fb44b4331a7dfb8e0f2642cc08.webp",982,{"page_no":81,"url":153,"width":154,"height":155},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-03/0d1f05aa94eb3985a1a0def9e5dba3c0.webp",981,735,{"page_no":19,"url":157,"width":158,"height":159},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-03/7e66a64486b1387778a91b1566a7b97a.webp",980,734,{"page_no":24,"url":161,"width":162,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-03/e5345bf33145f0d312dc31e0dbb58216.webp",979,733,{"page_no":29,"url":165,"width":166,"height":163},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-12-03/bc16fb1f868c2b1d0b86ac73e8429b02.webp",978,{"list":168,"token":66},[169,175,181,187,193,199,204,210,216,222],{"doc_id":170,"doc_title":171,"file_type":136,"home_preview_img_url":172,"slug":173,"view_count":24,"category_name":30,"create_tm":174},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=1796355119&Signature=W%2B1qeQlj87PUjrevtze%2BrJ0t1CU%3D","l6b-linked-list-variations-lecture-6b",1794017196,{"doc_id":176,"doc_title":177,"file_type":136,"home_preview_img_url":178,"slug":179,"view_count":44,"category_name":30,"create_tm":180},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=1796355119&Signature=QGyU9vqwPIav34qGS21wNKe%2BOIM%3D","lecture-five-linked-list-structure",1794017204,{"doc_id":182,"doc_title":183,"file_type":136,"home_preview_img_url":184,"slug":185,"view_count":34,"category_name":30,"create_tm":186},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=1796355119&Signature=dpWzG7xi8g%2BS06gaRL196DSxEio%3D","cs62-class-8-linked-lists-basic-data-structures",1794017629,{"doc_id":188,"doc_title":189,"file_type":136,"home_preview_img_url":190,"slug":191,"view_count":34,"category_name":30,"create_tm":192},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=1796355119&Signature=lShtRZITu3SsgRSe0EeshUOHsfk%3D","lecture-12-doubly-linked-lists-with-recursion",1794446071,{"doc_id":194,"doc_title":195,"file_type":136,"home_preview_img_url":196,"slug":197,"view_count":24,"category_name":30,"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=1796355119&Signature=Oqh%2BF%2BA2RCwXtDpCykiUnMzsRNc%3D","linked-list-course-13004700-part-2",1794017631,{"doc_id":200,"doc_title":201,"file_type":136,"home_preview_img_url":202,"slug":203,"view_count":19,"category_name":30,"create_tm":174},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=1796355119&Signature=UKbqgTFEzSi6guSLignJ1T%2BVYnY%3D","circular-linked-lists-all-operations-and-complexity-analysis",{"doc_id":205,"doc_title":206,"file_type":136,"home_preview_img_url":207,"slug":208,"view_count":24,"category_name":30,"create_tm":209},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=1796355119&Signature=fgdAFpGKxDVhNCI0dzX%2BVUXd0Hg%3D","rohini-college-of-engineering-technology-linked-list-implementation-singly-linked-lists-core-algorithms-for-traversal-counting-searching-and-insertion",1794017223,{"doc_id":211,"doc_title":212,"file_type":136,"home_preview_img_url":213,"slug":214,"view_count":81,"category_name":30,"create_tm":215},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=1796355119&Signature=kib0qDzO6ex1G0oCqT3fYjdEojw%3D","singly-linked-lists-in-c-introduction-and-traversal-example",1795382670,{"doc_id":217,"doc_title":218,"file_type":136,"home_preview_img_url":219,"slug":220,"view_count":29,"category_name":30,"create_tm":221},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=1796355119&Signature=lpmFhtGO5s0eVJkEF4mr9mSsANM%3D","linked-lists-introduction-properties-advantages-disadvantages-and-types",1794016969,{"doc_id":223,"doc_title":224,"file_type":136,"home_preview_img_url":225,"slug":226,"view_count":24,"category_name":30,"create_tm":227},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=1796355119&Signature=BnOQ2ahgyxloN5EKkj6%2FOBHnpAw%3D","lecture-11-doubly-linked-lists",1794446060]