[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-697945-105":59,"doc-detail-697945-en":130,"doc-similar-697945":162},{"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":123,"head_meta":125,"extra_data":127,"updated_unix":129},105,"en","linked-lists-part-19-data-structures-lecture-notes","Linked Lists - Part 19 - Data Structures Lecture Notes","","Lecture notes on linked lists within the “Data Structures” unit for UC Berkeley EECS Computer Science 88, delivered by Michael Ball. The material motivates why data structures matter for organizing programs and data, introduces linked lists as recursive structures, and models them using a minimal Python class. It covers the basic “first value + pointer to rest” structure, explains the implicit recursion pattern, and demonstrates two ways to traverse list items: a recursive function with a base case and an iterative approach using a loop and an empty-list check.",{"@graph":69,"@context":122},[70,84,105],{"@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-lists-part-19-data-structures-lecture-notes/697945/",{"url":83,"name":65,"@type":85,"image":86,"author":91,"headline":65,"publisher":94,"fileFormat":97,"inLanguage":63,"description":67,"dateModified":98,"datePublished":99,"encodingFormat":97,"isAccessibleForFree":100,"interactionStatistic":101},"DigitalDocument",{"url":87,"@type":88,"width":89,"height":90},"https://docshare.wps.com/thumbnails/linked-lists-part-19-data-structures-lecture-notes/697945.png","ImageObject",300,407,{"name":92,"@type":93},"Dewi_Sukmawati","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-24","2026-11-12",true,{"@type":102,"interactionType":103,"userInteractionCount":24},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What is the main purpose of studying data structures in this lecture?","Question",{"text":112,"@type":113},"The lecture explains that data structures help organize both programs and the data they process. It emphasizes using common patterns to solve a wide variety of problems.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"How are linked lists modeled conceptually and in code?",{"text":117,"@type":113},"Linked lists are described as recursive structures containing other linked lists. Each item holds a value (the “first”) and a pointer to the rest, modeled with a small Python class called Link.",{"name":119,"@type":110,"acceptedAnswer":120},"How does the lecture show traversing a linked list?",{"text":121,"@type":113},"It demonstrates traversal using recursion with a base case for the empty list, performing an action on the current item and then recursing on the rest. It also provides an iterative approach that loops through items while tracking the current node.","https://schema.org",{"og:url":83,"og:type":124,"og:title":65,"og:site_name":95,"og:description":67},"article",{"robots":126,"canonical":83},"index,follow",{"doc_id":128,"site_id":62},697945,1794446271,{"code":4,"msg":5,"data":131},{"doc_id":128,"user_id":132,"nickname":92,"user_avatar":133,"doc_module":4,"category_id":29,"category_name":30,"doc_title":65,"doc_description":67,"doc_content":134,"file_id":135,"file_url":136,"file_type":137,"file_size":138,"view_count":24,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":139,"language":140,"language_code":63,"site_id":62,"html_lang":63,"table_of_contents":141,"faqs":142,"seo_title":143,"seo_description":67,"update_tm":129,"read_time":144,"preview_page_count":19,"preview_urls":145},962094243415,"https://ap-avatar.wpscdn.com/davatar_3d24733baf745e90a7e4bdd5f77d97b2","Computational Structures in Data Science   \nUC Berkeley EECS Lecturer Michael Ball  \nData Structures: Linked Lists  \nUC Berkeley | Computer Science 88 | Michael Ball | [http://cs88.org](http://cs88.org)  \nAnnouncements  \n• November Holidays!  \n– Please check the calendar.  \n– Nov 11, Veteran's Day: No C88C / Other Classes  \n– Thanksgiving Week, Nov 23-25:» Weds / Thur / Fri: Berkeley is off » Tues 11/22: No Lecture » No C88C labs  \n» OH Monday / Tues: TBD.  \nUC Berkeley | Computer Science 88 | Michael Ball | [http://cs88.org](http://cs88.org)  \nWhy \"Data Structures\"? (Next Few lectures)  \n•Data Structures  \n–OOP helps us organize our programs  \n–Data Structures help us organize our data!  \n–You already know lists and dictionaries!  \n–We’ll see a new one today  \n• Enjoy this stuff? Take 61B!  \n• Find it challenging? Don’t worry! It’s a different way of thinking.  \nUC Berkeley | Computer Science 88 | Michael Ball | [http://cs88.org](http://cs88.org)  \nComputational Structures in Data Science   \nUC Berkeley EECS Lecturer Michael Ball  \nLinked Lists  \nUC Berkeley | Computer Science 88 | Michael Ball | [http://cs88.org](http://cs88.org)  \nData Structures  \n•A data structure is a way to organize or group a bunch of independent pieces of data.  \n–Lists (arrays)  \n–Dictionaries  \n–Tuples  \n•A class, on its own, is not necessarily a data structure, it represents a new data type.  \n–a \"car\" or a \"person\" is an instance of that data type.  \n– Lists, Dicts, etc are also data types; their goal is to organize other data.  \n•These are common patterns that can be used to solve a wide variety of problems.  \n•Sometimes we're giving structure to make it easier as a programmer, sometimes we're trying to be fast or efficient.  \nUC Berkeley | Computer Science 88 | Michael Ball | [http://cs88.org](http://cs88.org)  \nLinked Lists  \n• A Recursive List, sometimes called a \"rlist\"  \n• Linked lists contain other linked lists  \n•A series of items with two pieces:  \n–A value, usually called \"first\"  \n–A “pointer” to the rest of the items in the list.  \n•We’ll use a very small Python class “Link” to model this.  \n•Link(12, Link(99, Link(37, Link.empty ) ))  \nUC Berkeley | Computer Science 88 | Michael Ball | [http://cs88.org](http://cs88.org)  \nclass Link:  \nempty = ()  \ndef   init   (self, first, rest=empty): [self.fi](self.fi)rst = first  \n[self. rest = rest](self. rest = rest)  \nThat's all we need!  \n• We can add a   repr  method, length, etc .  \n• Use an empty tuple for clarity / easier than None.  \n–() has lots of useful methods defined, like len()  \nUC Berkeley | Computer Science 88 | Michael Ball | [http://cs88.org](http://cs88.org)  \nRecursion Is Implicit  \n| \u003Cbr>[self. rest](self. rest) |\n| --- |\n|  |\n\nUC Berkeley | Computer Science 88 | Michael Ball | [http://cs88.org](http://cs88.org)  \nIterating Over All Items in Linked List  \ndef print_link (link):  \nif not link:  \nreturn print( [link.fi](link.fi)rst)  \nprint_link([link. rest](link. rest) )  \n• Base Case: No more items  \n• Do Action  \n• Recurse on the rest of the list  \ndef print_link (link):  \nif not link:  \nreturn  \nitem = link  \nwhile item:  \nprint( [item.fi](item.fi)rst) [item = item. rest](item = item. rest)  \n• Handle the empty list  \n• Keep track of current item  \n• Update item to be the next in sequence .  \nUC Berkeley | Computer Science 88 | Michael Ball | [http://cs88.org](http://cs88.org)  \nDemo – See the Notebook  \nUC Berkeley | Computer Science 88 | Michael Ball | [http://cs88.org](http://cs88.org)","cbCairVFScIQ72WX","https://ap.wps.com/l/cbCairVFScIQ72WX","pdf",253615,14,"English","# Why \"Data Structures\"?\n## Data structures and organization\n# Linked Lists\n## Recursive list concept\n## Node structure: value and pointer\n# A minimal Python model\n## Link class and empty tuple\n# Recursion is implicit\n# Iterating over all items in a linked list\n## Recursive traversal\n## Iterative traversal\n# Demo","[{\"question\":\"What is the main purpose of studying data structures in this lecture?\",\"answer\":\"The lecture explains that data structures help organize both programs and the data they process. It emphasizes using common patterns to solve a wide variety of problems.\"},{\"question\":\"How are linked lists modeled conceptually and in code?\",\"answer\":\"Linked lists are described as recursive structures containing other linked lists. Each item holds a value (the “first”) and a pointer to the rest, modeled with a small Python class called Link.\"},{\"question\":\"How does the lecture show traversing a linked list?\",\"answer\":\"It demonstrates traversal using recursion with a base case for the empty list, performing an action on the current item and then recursing on the rest. It also provides an iterative approach that loops through items while tracking the current node.\"}]","Linked Lists - Part 19 - Data Structures Lecture Notes | PDF",35,[146,150,154,158],{"page_no":8,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/3d43f0177c6bd6fa1ab97eedd225a803.webp",983,759,{"page_no":14,"url":151,"width":152,"height":153},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/73af06a4f28f4ff3967cdb5f951c2645.webp",982,758,{"page_no":81,"url":155,"width":156,"height":157},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/b0d698d9260cc40db881384350d1a5fb.webp",981,757,{"page_no":19,"url":159,"width":160,"height":161},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/077bb47325b87216cc14e0ba250a1dc0.webp",980,756,{"list":163,"token":66},[164,170,176,182,188,194,200,206,212,218],{"doc_id":165,"doc_title":166,"file_type":137,"home_preview_img_url":167,"slug":168,"view_count":81,"category_name":30,"create_tm":169},697955,"Linked List Problems - 1 - Learn about linked lists - and build pointer algorithms","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010142257/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=bIByO0aBZAJuEVFokbHeRhsn7lw%3D","linked-list-problems-1-learn-about-linked-lists-and-build-pointer-algorithms",1794446335,{"doc_id":171,"doc_title":172,"file_type":137,"home_preview_img_url":173,"slug":174,"view_count":81,"category_name":30,"create_tm":175},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=1796111999&Signature=o1%2BByYLmdRttPkW4V%2B5hWZFj3Sw%3D","unit11-linked-lists",1795382671,{"doc_id":177,"doc_title":178,"file_type":137,"home_preview_img_url":179,"slug":180,"view_count":34,"category_name":30,"create_tm":181},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":183,"doc_title":184,"file_type":137,"home_preview_img_url":185,"slug":186,"view_count":14,"category_name":30,"create_tm":187},685743,"12-Linked Lists - Algorithms: longest sublist sum to n","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000186244/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=5VVgvW3AmJpxC%2F%2BKKaFB2WUZmbg%3D","12-linked-lists-algorithms-longest-sublist-sum-to-n",1794017227,{"doc_id":189,"doc_title":190,"file_type":137,"home_preview_img_url":191,"slug":192,"view_count":19,"category_name":30,"create_tm":193},685718,"14-Linked-Lists - Tree Recursion with Lists - Linked List Structure and Processing","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000182459/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=VTGLe4PjuddSzNdQQvPlp4LqsjA%3D","14-linked-lists-tree-recursion-with-lists-linked-list-structure-and-processing",1794016971,{"doc_id":195,"doc_title":196,"file_type":137,"home_preview_img_url":197,"slug":198,"view_count":34,"category_name":30,"create_tm":199},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":201,"doc_title":202,"file_type":137,"home_preview_img_url":203,"slug":204,"view_count":19,"category_name":30,"create_tm":205},685767,"Implementation of Linked List - Lecture 7 - In C++","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000198089/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=ya8NyMqRODvoBewizBtiMCfZ8MM%3D","implementation-of-linked-list-lecture-7-in-c",1794017950,{"doc_id":207,"doc_title":208,"file_type":137,"home_preview_img_url":209,"slug":210,"view_count":81,"category_name":30,"create_tm":211},732880,"Linked List Basics - Linked List Basics - Insertion, Deletion, Navigation, and Advanced Operations","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230031780344/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111999&Signature=4qOzk65WtlV4%2BzUC1IXiuSBFd%2Fs%3D","linked-list-basics-linked-list-basics-insertion-deletion-navigation-and-advanced-operations",1795382679,{"doc_id":213,"doc_title":214,"file_type":137,"home_preview_img_url":215,"slug":216,"view_count":24,"category_name":30,"create_tm":217},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":219,"doc_title":220,"file_type":137,"home_preview_img_url":221,"slug":222,"view_count":19,"category_name":30,"create_tm":223},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=1796111999&Signature=NMuSUr0FZ%2Bb4jIZ8V5qs3mNZqx8%3D","lecture-10-linked-lists-lecture-notes",1795382672]