[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"doc-seo-697940-105":3,"detail-sidebar-cat-0-en-105":80,"doc-detail-697940-en":130,"doc-similar-697940":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","doubly-linked-lists-part-10-doubly-linked-lists-and-java-collections","Doubly Linked Lists - Part 10 - Doubly Linked Lists and Java Collections","","Lecture 10-11 materials on doubly linked lists within “Data Structures and Advanced Programming” (CS062). The slides define doubly linked lists via a recursive definition, describe the Node structure and its head/tail references, and present standard operations such as construction, emptiness check, size retrieval, indexed access, insertion at head/tail, insertion at a specified index, and removals from head, tail, or by index. Examples illustrate how addFirst and addLast change head, tail, and length.",{"@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/exam/","Exam",3,{"item":32,"name":10,"@type":21,"position":33},"https://docshare.wps.com/document/doubly-linked-lists-part-10-doubly-linked-lists-and-java-collections/697940/",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/doubly-linked-lists-part-10-doubly-linked-lists-and-java-collections/697940.png","ImageObject",300,407,{"name":42,"@type":43},"fresh2021","Person",{"url":19,"name":45,"@type":46},"DocShare","Organization","application/pdf","2026-11-19","2026-11-12",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},"How is a doubly linked list defined in these slides?","Question",{"text":62,"@type":63},"It is either empty (null) or a node that includes references to both the previous and next node (itself forming a doubly linked list).","Answer",{"name":65,"@type":60,"acceptedAnswer":66},"What standard operations are covered for a doubly linked list?",{"text":67,"@type":63},"The slides cover constructing an empty list, checking emptiness, getting size, retrieving an item by index, adding at the head, tail, or a specified index, and removing from the head, tail, or by index.",{"name":69,"@type":60,"acceptedAnswer":70},"How do addFirst and addLast affect the list state?",{"text":71,"@type":63},"Examples show addFirst inserts at the head and increases n, while addLast inserts at the tail and increases n, updating the head/tail references accordingly.","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},697940,1794446070,{"code":4,"msg":81,"data":82},"success",[83,87,91,94,99,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":29,"show_sort_weight":92,"slug":93},70,"exam",{"id":95,"doc_module":4,"doc_module_name":25,"category_name":96,"show_sort_weight":97,"slug":98},5,"Comic",60,"comic",{"id":100,"doc_module":4,"doc_module_name":25,"category_name":101,"show_sort_weight":102,"slug":103},6,"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":95,"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":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":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":33,"preview_urls":145},962093912154,"https://ap-avatar.wpscdn.com/davatar_9964176cb1d06d4a9deccf72a44ae3dc","BASIC DATA STRUCTURES  \nCS062  \nDATA STRUCTURES AND ADVANCED PROGRAMMING  \n10-11: Doubly Linked Lists  \nAlexandra Papoutsaki  \nLECTURES  \nSome slides adopted from Princeton C0S226 course or Algorithms, 4th  \nEdition  \nMark Kampe  \nLABS  \nTODAY’S LECTURE IN A NUTSHELL 2  \nLecture 10: Doubly Linked Lists  \n▸ Doubly Linked Lists  \n▸ Java Collections  \nSome slides adopted from Algorithms 4th Edition and Oracle tutorials  \nDOUBLY LINKED LISTS 3  \nRecursive Deﬁnition of Doubly Linked Lists  \n‣ A doubly linked list is either empty (null) or a node having a reference to a doubly linked list.  \n‣ Node: is a data type that holds any kind of data and two references to the previous and next node.  \nNode  \nHead/Beginning/Front/First Tail/End/Back/Last  \nDOUBLY LINKED LISTS 4  \nNode  \nprivate class Node { Item item; Node next;  \nNode prev;}  \nNode  \nDOUBLY LINKED LISTS 5  \nStandard Operations  \n‣ DoublyLinkedList() : Constructs an empty doubly linked list.  \n‣ isEmpty():Returns true if the doubly linked list does not contain any item.  \n‣ size() : Returns the number of items in the doubly linked list.  \n‣ get(int index) : Returns the item at the speciﬁed index .  \n‣ addFirst(Item item) : Inserts the speciﬁed item at the head of the doubly linked list.  \n‣ addLast(Item item) : Inserts the speciﬁed item at the tail of the doubly linked list.  \n‣ add(int index, Item item) : Inserts the speciﬁed item at the speciﬁed index .‣ Item removeFirst() : Retrieves and removes the head of the doubly linked list.‣ Item removeLast() : Retrieves and removes the tail of the doubly linked list.  \n‣ Item remove(int index) : Retrieves and removes the item at the speciﬁed index .  \nDOUBLY LINKED LISTS 6  \nDoublyLinkedList() : Constructs an empty DLL  \nDoublyLinkedList\u003CString> dll = new DoublyLinkedList\u003CString>();  \nhead = null  \ntail = null  \nn = 0  \nWhat should happen?  \ndll .addFirst(“CS062”);  \nDOUBLY LINKED LISTS 7  \naddFirst(Item item): Inserts the speciﬁed item at the head of the doubly linked list  \nHead/Beginning/Front/First Tail/End/Back/Last  \ndll.addFirst(“CS062”)  \nn=1  \nWhat should happen?  \ndll .addFirst(“ROCKS”);  \nDOUBLY LINKED LISTS 8  \naddFirst(Item item): Inserts the speciﬁed item at the head of the doubly linked list  \ndll.addFirst(“ROCKS”)  \nn=2  \nWhat should happen?  \ndll .addLast(“!”);  \nDOUBLY LINKED LISTS 9  \naddLast(Item item): Inserts the speciﬁed item at the tail of the doubly linked list  \nHead/Beginning/Front/First  \nTail/End/Back/Last  \n\n|  | ROCKS |  | |  | CS062 |  |  |  | ! |  |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n|  |  |  |  |  |  |  |  |  |  |  |\n|  |  |  |  |  |  |  |  |  |  |  |\n\ndll.addLast(“!”)  \nn=3  \nWhat should happen?  \ndll .add(1,“?”);  \nDOUBLY LINKED LISTS 10  \nadd(int index, Item item):Adds item at the speciﬁed index  \nHead/Beginning/Front/First  \nTail/End/Back/Last  \n\n|  | ROCKS |  | |  | ? |  |  |  | CS062 |  |  |  | ! |  |\n| --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- | --- |\n|  |  |  |  |  |  |  | |  |  |  |  |  |  |  |\n|  |  |  |  |  |  |  |  |  |  |  |  |  |  |  |\n\ndll.add(1,“?”)  \nn=4  \nWhat should happen?  \ndll . removeFirst();","cbCaideDXioi4uKp","https://ap.wps.com/l/cbCaideDXioi4uKp","pdf",1506711,29,"English","# TODAY’S LECTURE IN A NUTSHELL\n## Lecture 10: Doubly Linked Lists\n## Doubly Linked Lists\n## Standard Operations","[{\"question\":\"How is a doubly linked list defined in these slides?\",\"answer\":\"It is either empty (null) or a node that includes references to both the previous and next node (itself forming a doubly linked list).\"},{\"question\":\"What standard operations are covered for a doubly linked list?\",\"answer\":\"The slides cover constructing an empty list, checking emptiness, getting size, retrieving an item by index, adding at the head, tail, or a specified index, and removing from the head, tail, or by index.\"},{\"question\":\"How do addFirst and addLast affect the list state?\",\"answer\":\"Examples show addFirst inserts at the head and increases n, while addLast inserts at the tail and increases n, updating the head/tail references accordingly.\"}]","Doubly Linked Lists - Part 10 - Doubly Linked Lists and Java Collections | PDF",73,[146,150,153,157],{"page_no":22,"url":147,"width":148,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/c53c71bb48946c48a58800bd3d901f91.webp",983,736,{"page_no":26,"url":151,"width":152,"height":149},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/38574daaa3673745c9ad941d41d05eed.webp",982,{"page_no":30,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/1ac4a975f505ff2add36a854de0b9f04.webp",981,735,{"page_no":33,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/d41818eb5e78e6094d5d1585ad733def.webp",980,734,{"list":162,"token":11},[163,169,175,181,187,193,199,206,213,219],{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":33,"category_name":29,"create_tm":168},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=1796167619&Signature=R6neNvIxut65yQsLapYBcP6DJmI%3D","linked-list-in-python-lecture-4-implementation",1794446273,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":123,"category_name":29,"create_tm":174},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=1796167619&Signature=K1LuwItlyomB9OxjfVpCN3P%2BrxI%3D","cs-2351-data-structures-linked-lists",1794017950,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":30,"category_name":29,"create_tm":180},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=1796167619&Signature=hWdhYq%2BrFQ2Ae3b16dhnIWYpmi8%3D","linked-lists-in-mips-mips-implementation-recursive-functions-isa-and-x86-vs-mips-comparison",1795382683,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":115,"category_name":29,"create_tm":186},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=1796167619&Signature=IJo2xoqnC58FG7gfKP0mpgAzG7g%3D","c-linked-lists-review-list-operations-and-traversal",1794016536,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":105,"category_name":29,"create_tm":192},686726,"Lists - Topic 12 - The List ADT","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230001098829/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167619&Signature=Du%2FG2vlfIkPJ0tYBPt%2FLkcUIQ%2F4%3D","lists-topic-12-the-list-adt",1794062170,{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":110,"category_name":29,"create_tm":198},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=1796167619&Signature=hFPRXfS%2FPyTXKO%2Bpp5AXlqZ6sN0%3D","singly-linked-list-class-exam-1-review-and-hw5-card-game-efficiency",1794017629,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":204,"category_name":29,"create_tm":205},670586,"CSE1305 Algorithms & Data Structures Resit Analysis Exam - 05 April 2022","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229988344110/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167619&Signature=7YrUDv60E8%2BrDa8tmiR%2FaXZVUJ0%3D","cse1305-algorithms-data-structures-resit-analysis-exam-05-april-2022",12,1793570149,{"doc_id":207,"doc_title":208,"file_type":137,"home_preview_img_url":209,"slug":210,"view_count":211,"category_name":29,"create_tm":212},430701,"4000 ESSENTIAL ENGLISH WORDS - Second Edition - Vocabulary and Reading","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229923149159/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167619&Signature=l5%2F4eW5E06Iwoic5XGAYo7fGxuE%3D","4000-essential-english-words-second-edition-vocabulary-and-reading",21,1790653487,{"doc_id":214,"doc_title":215,"file_type":137,"home_preview_img_url":216,"slug":217,"view_count":100,"category_name":29,"create_tm":218},697956,"Linked List - Lecture 23-24 - Notes","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010142265/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167619&Signature=siyjng9XY52dt4G9bKEsJ1Wfydc%3D","linked-list-lecture-23-24-notes",1794446335,{"doc_id":220,"doc_title":221,"file_type":137,"home_preview_img_url":222,"slug":223,"view_count":204,"category_name":29,"create_tm":224},461668,"Quiz 02-Practice - COMP 110 Practice Quiz - Spring 2024","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229926083182/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796167619&Signature=AxcM8Pz%2FQaPlZmHkw4FLqsXCSlA%3D","quiz-02-practice-comp-110-practice-quiz-spring-2024",1790762100]