[{"data":1,"prerenderedAt":-1},["ShallowReactive",2],{"detail-sidebar-cat-0-en-105":3,"doc-seo-697937-105":59,"doc-detail-697937-en":130,"doc-similar-697937":161},{"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","doubly-linked-list-basic-operations-and-circular-linked-list","Doubly Linked List - Basic Operations and Circular Linked List","","Doubly Linked List explains a linked list variation that supports bidirectional navigation, enabling easy traversal forward and backward. The content defines core terms such as data, next, prev, and the first/last links, then details key operations including insertion and deletion at the beginning and end, plus insertion after and deletion by key, and forward/backward display. It also introduces circular linked lists, showing how nodes connect to form a loop in one or both directions, and provides sample algorithms and code-style logic for insert, delete, and display.",{"@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/doubly-linked-list-basic-operations-and-circular-linked-list/697937/",{"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/doubly-linked-list-basic-operations-and-circular-linked-list/697937.png","ImageObject",300,407,{"name":92,"@type":93},"I feel Different","Person",{"url":74,"name":95,"@type":96},"DocShare","Organization","application/pdf","2026-11-18","2026-11-12",true,{"@type":102,"interactionType":103,"userInteractionCount":29},"InteractionCounter",{"@type":104},"ViewAction",{"@type":106,"mainEntity":107},"FAQPage",[108,114,118],{"name":109,"@type":110,"acceptedAnswer":111},"What is a Doubly Linked List and how does it differ from a Single Linked List?","Question",{"text":112,"@type":113},"A Doubly Linked List allows traversal in both directions using next and prev pointers, making forward and backward navigation easy compared to a Single Linked List.","Answer",{"name":115,"@type":110,"acceptedAnswer":116},"Which basic operations are supported by a Doubly Linked List in this document?",{"text":117,"@type":113},"The document lists insertion and deletion at the beginning, insertion and deletion at the end, insert after an item, deletion by key, and displaying the list forward or backward.",{"name":119,"@type":110,"acceptedAnswer":120},"How does a circular linked list connect its nodes?",{"text":121,"@type":113},"In a singly circular list, the last node’s next points to the first node. In a doubly circular list, the last node’s next points to the first node and the first node’s prev points to the last node, forming a loop in both directions.","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},697937,1794446062,{"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":29,"is_deleted":4,"is_public":8,"is_downloadable":8,"audit_status":8,"page_count":29,"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":129,"read_time":143,"preview_page_count":19,"preview_urls":144},962093541761,"https://ap-avatar.wpscdn.com/davatar_29158cc5080c5b710cf443261637dec0","Doubly Linked List  \nDoubly Linked List is a variation of Linked list in which navigation is possible in both ways, either forward and backward easily as compared to Single Linked List. Following are the important terms to understand the concept of doubly linked list.  \n• Data − Each node of a linked list can store a data called an element.  \n• Next− Each link of a linked list contains a link to the next link called Next.  \n• Prev − Each link of a linked list contains a link to the previous link called Prev.  \n• LinkedList − A Linked List contains the connection link to the first link called First and to the last link called Last.  \nDoubly Linked List Representation :  \nAs per the above illustration, following are the important points to be considered.  \n• Doubly Linked List contains a link element called first and last.  \n• Each node carries a data field(s) and two link fields called next and prev.  \n• Each node is linked with its next link using its next link.  \n• Each node is linked with its previous link using its previous link.  \n• The last node carries a link as null to mark the end of the list.  \nBasic Operations :  \nFollowing are the basic operations supported by a doubly linked list.  \n• Insertion − Adds an element at the beginning of the list.  \n• Deletion − Deletes an element at the beginning of the list.  \n• Insert Last − Adds an element at the end of the list.  \n• Delete Last − Deletes an element from the end of the list.  \n• Insert After − Adds an element after an item of the list.  \n• Delete − Deletes an element from the list using the key.  \n• Display forward − Displays the complete list in a forward manner.  \n• Display backward − Displays the complete list in a backward manner.  \nInsertion Operation :  \nThe following code demonstrates the insertion operation at the beginning of a doubly linked list.  \n//insert node at the first location  \nvoid insertFirst(int key, int data){  \n//create a node  \nstruct node *link = (struct node*) malloc(sizeof(struct node));  \nlink->key = key;  \nlink->data = data;  \nif(isEmpty()){  \nlast = link; //make it the last link}  \nelse {  \nhead->prev = link; //update first prev link}  \nlink->next = head; //point it to old first link  \nhead = link; //point first to new first link}  \nDeletion Operation :  \nFollowing code demonstrates the deletion operation at the beginning of a doubly linked list.  \n//delete first item  \nstruct node* deleteFirst(){  \nstruct node *tempLink = head; //save reference to first link  \nif(head->next == NULL) //if only one link  \n{  \nlast = NULL;  \n}  \nelse  \n{  \nhead->next->prev = NULL;  \n}  \nhead = head->next;  \nreturn tempLink; //return the deleted link  \n}  \nInsertion at the End of list :  \nFollowing code demonstrates the insertion operation at the last position of a doubly linked list.  \n//insert node at the last location void insertLast(int key, int data){  \n//create a node  \nstruct node *link = (struct node*) malloc(sizeof(struct node)); link->key = key;  \nlink->data = data;  \nif(isEmpty()){  \nlast = link; //make it the last link  \n} else {  \nlast->next = link; //make link a new last link  \nlink->prev = last; //mark old last node as prev of new link  \n}  \nlast = link; //mark old last node as prev of new link}  \nCircular Linked List  \nCircular Linked List is a variation of Linked list in which the first element points to the last element and the last element points to the first element. Both Singly Linked List and Doubly Linked List can be made into a circular linked list.  \nSingly Linked List as Circular :  \nIn singly linked list, the next pointer of the last node points to the first node.  \nDoubly Linked List as Circular :  \nIn doubly linked list, the next pointer of the last node points to the first node and the previous pointer of the first node points to the last node making the circular in both directions.  \nAs per the above illustration, following are the important points to be considered.  \n• The last link's next points to the first link of the list","cbCaihXkQvybcZWc","https://ap.wps.com/l/cbCaihXkQvybcZWc","pdf",138692,"English","# Doubly Linked List\n## Important Terms\n## Doubly Linked List Representation\n## Basic Operations\n## Insertion at the Beginning\n## Deletion at the Beginning\n## Insertion at the End\n# Circular Linked List\n## Singly Linked List as Circular\n## Doubly Linked List as Circular\n## Basic Operations\n## Insertion Algorithm\n## Deletion Algorithm\n## Display Operation","[{\"question\":\"What is a Doubly Linked List and how does it differ from a Single Linked List?\",\"answer\":\"A Doubly Linked List allows traversal in both directions using next and prev pointers, making forward and backward navigation easy compared to a Single Linked List.\"},{\"question\":\"Which basic operations are supported by a Doubly Linked List in this document?\",\"answer\":\"The document lists insertion and deletion at the beginning, insertion and deletion at the end, insert after an item, deletion by key, and displaying the list forward or backward.\"},{\"question\":\"How does a circular linked list connect its nodes?\",\"answer\":\"In a singly circular list, the last node’s next points to the first node. In a doubly circular list, the last node’s next points to the first node and the first node’s prev points to the last node, forming a loop in both directions.\"}]","Doubly Linked List - Basic Operations and Circular Linked List | PDF",15,[145,149,153,157],{"page_no":8,"url":146,"width":147,"height":148},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/c2000755533f90795120a0f70bb6de45.webp",983,1272,{"page_no":14,"url":150,"width":151,"height":152},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/b2361a11ab53b0a4e5769416bab9aaec.webp",982,1270,{"page_no":81,"url":154,"width":155,"height":156},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/a44d294232daf59091454f9db50d8bc9.webp",981,1269,{"page_no":19,"url":158,"width":159,"height":160},"https://res-academy.cache.wpscdn.com/upload/kdocshare/2026-11-12/8faa158bc05700562ddf75114f1ee773.webp",980,1268,{"list":162,"token":66},[163,169,175,181,187,193,199,205,210,216],{"doc_id":164,"doc_title":165,"file_type":137,"home_preview_img_url":166,"slug":167,"view_count":29,"category_name":30,"create_tm":168},685764,"Lists and Linked Lists - Part 1 - Introduction","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110229999691137/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=a9cl3pvWJ4IxC%2BQQ09GZl040Bak%3D","lists-and-linked-lists-part-1-introduction",1794017635,{"doc_id":170,"doc_title":171,"file_type":137,"home_preview_img_url":172,"slug":173,"view_count":19,"category_name":30,"create_tm":174},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=1796111279&Signature=8utzDubYEZAjMAT3xR0EsUwqIZY%3D","lecture-17-linked-list-data-structure-part-ii-double-linked-list-applications-and-insertion",1795006749,{"doc_id":176,"doc_title":177,"file_type":137,"home_preview_img_url":178,"slug":179,"view_count":34,"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=1796111279&Signature=NUPXWk%2BsaCHf8rPmqb3FrsunesQ%3D","lecture-five-linked-list-structure",1794017204,{"doc_id":182,"doc_title":183,"file_type":137,"home_preview_img_url":184,"slug":185,"view_count":19,"category_name":30,"create_tm":186},685792,"Array Implementation of List - Array Operations (Create, Insert, Delete, Display, Search)","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230000212417/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=6fsrntW6odOIuYadSzPY9565SZg%3D","array-implementation-of-list-array-operations-create-insert-delete-display-search",1794018669,{"doc_id":188,"doc_title":189,"file_type":137,"home_preview_img_url":190,"slug":191,"view_count":24,"category_name":30,"create_tm":192},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=1796111279&Signature=gv7RnjQA3vGAdwb%2FFWzq3dSTmcg%3D","linked-lists-introduction-properties-advantages-disadvantages-and-types",1794016969,{"doc_id":194,"doc_title":195,"file_type":137,"home_preview_img_url":196,"slug":197,"view_count":29,"category_name":30,"create_tm":198},698704,"CMSC 420 - Skip Lists","https://weboffice-temporary-prod-sg.obs.ap-southeast-3.myhuaweicloud.com:443/export/thumbnail/export/thumbnail/110230010410348/last/300/407?AWSAccessKeyId=HPUAE6OPDRI9QZXR6WJG&Expires=1796111279&Signature=arntsjqibkbFttKtq%2Bh1ANXafSU%3D","cmsc-420-skip-lists",1794454926,{"doc_id":200,"doc_title":201,"file_type":137,"home_preview_img_url":202,"slug":203,"view_count":19,"category_name":30,"create_tm":204},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=1796111279&Signature=h5wqC6NlvkAR%2FmOsvHROS6cbJSI%3D","circular-linked-lists-all-operations-and-complexity-analysis",1794017196,{"doc_id":206,"doc_title":207,"file_type":137,"home_preview_img_url":208,"slug":209,"view_count":24,"category_name":30,"create_tm":204},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=1796111279&Signature=0OP8tmzMFAi8xVBXDGMRpnNutLo%3D","l6b-linked-list-variations-lecture-6b",{"doc_id":211,"doc_title":212,"file_type":137,"home_preview_img_url":213,"slug":214,"view_count":81,"category_name":30,"create_tm":215},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=1796111279&Signature=yOmHPG0nmNBQwryn31yblhqpC0g%3D","linked-list-basics-linked-list-basics-insertion-deletion-navigation-and-advanced-operations",1795382679,{"doc_id":217,"doc_title":218,"file_type":137,"home_preview_img_url":219,"slug":220,"view_count":34,"category_name":30,"create_tm":221},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=1796111279&Signature=G82m7KvL8JgwnNGMHZQL0RtJDXg%3D","lecture-12-doubly-linked-lists-with-recursion",1794446071]