{"id":730,"date":"2020-06-08T06:23:41","date_gmt":"2020-06-08T06:23:41","guid":{"rendered":"http:\/\/learnlearn.uk\/alevelcs\/?page_id=730"},"modified":"2023-05-03T08:06:21","modified_gmt":"2023-05-03T08:06:21","slug":"linked-list","status":"publish","type":"page","link":"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/","title":{"rendered":"Linked List"},"content":{"rendered":"<div class=\"responsive-tabs\">\n<h2 class=\"tabtitle\">Linked Lists<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Linked Lists<\/h3>\n<p>At its simplest, a linked list is a data structure that contains a series of nodes, where each node is linked to the next node in the list. Each node contains two main parts: the actual data that we want to store, and a pointer to the next node in the list.<\/p>\n<p>Linked lists are dynamic data structures, which means that we can add or remove nodes from the list at any time. This makes them very flexible and efficient for certain types of operations, like inserting or deleting elements.<\/p>\n\n<\/div><h2 class=\"tabtitle\">SLL<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Singly Linked List<\/h3>\n<p>A singly linked list is a data structure that consists of a sequence of nodes, where each node stores a piece of data and a pointer to the next node in the list. In other words, each node contains two parts: the actual data that we want to store and a reference (or pointer) to the next node in the list.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-617\" src=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/11\/Single-Linked-List-With-Data-1024x229.jpg\" alt=\"\" width=\"750\" height=\"168\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">DLL<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Doubly Linked List<\/h3>\n<p>A doubly linked list is a type of data structure that consists of a sequence of nodes, where each node stores a piece of data and two pointers: one to the next node in the list, and one to the previous node in the list. In other words, each node contains three parts: the actual data that we want to store, a pointer to the next node in the list, and a pointer to the previous node in the list.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-614\" src=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/11\/Doubly-Linked-List-With-Data-1024x229.jpg\" alt=\"\" width=\"750\" height=\"168\" \/><\/p>\n<p>This extra pointer to the previous node makes doubly linked lists more versatile than singly linked lists. With a doubly linked list, we can traverse the list in either direction, from the head to the tail or from the tail to the head, making it easier to perform certain types of operations, like searching for a specific element.<\/p>\n\n<\/div><h2 class=\"tabtitle\">Circular SLL<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Circular Singly Linked List<\/h3>\n<p>A circularly linked list is a type of data structure that is similar to a singly linked list, but with one key difference: instead of having the last node point to null (signifying the end of the list), the last node in the list points back to the first node, forming a circle.<\/p>\n<p>This circular structure allows for some interesting properties. For example, we can traverse the list in a loop, continuously visiting each node in the list. Additionally, we no longer need to keep track of the head or tail of the list, since every node in the list can be treated as both the head and the tail.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-611\" src=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/11\/Copy-of-Circular-linked-list-with-data-1024x229.jpg\" alt=\"\" width=\"750\" height=\"168\" \/><\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Circular DLL<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Circular Doubly Linked List<\/h3>\n<p>circularly doubly linked list is a type of data structure that combines the features of both a circularly linked list and a doubly linked list. It is similar to a circularly linked list, with each node pointing to the next node in the list and the last node pointing back to the first node, forming a circle. However, each node also contains a pointer to the previous node in the list, creating a two-way connection between nodes.<\/p>\n<p><img decoding=\"async\" loading=\"lazy\" class=\"alignnone size-large wp-image-608\" src=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/11\/Circular-doubly-linked-list-with-data-1024x229.jpg\" alt=\"\" width=\"750\" height=\"168\" \/><\/p>\n<p>This two-way connection allows for some additional functionality compared to a regular circularly linked list. For example, we can traverse the list in either direction, from the head to the tail or from the tail to the head. We can also easily insert or delete elements from the middle of the list, since each node has pointers to both the previous and next nodes.<\/p>\n<p>Circularly doubly linked lists can be useful in many scenarios, such as implementing a queue, a stack, or a doubly ended queue (deque). However, they do require more memory than regular circularly linked lists, since each node needs to store an extra pointer.<\/p>\n<p>&nbsp;<\/p>\n\n<\/div><h2 class=\"tabtitle\">Resources<\/h2>\n<div class=\"tabcontent\">\n\n<h3>Resources<\/h3>\n<p><a href=\"https:\/\/docs.google.com\/presentation\/d\/1pvYVf2X5eNl92ito1KuWsieyqjpstaX26zH6POd4V8k\/edit?usp=sharing\">Teacher Presentation<\/a><\/p>\n<p><a href=\"https:\/\/visualgo.net\/en\/list?slide=1\">https:\/\/visualgo.net\/en\/list?slide=1<\/a><\/p>\n<\/div><\/div>\n","protected":false},"excerpt":{"rendered":"<p>Linked Lists At its simplest, a linked list is a data structure that contains a series of nodes, where each node is linked to the next node in the list. Each node contains two main parts: the actual data that we want to store, and a pointer to the next node in the list. Linked&hellip;&nbsp;<a href=\"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/\" class=\"\" rel=\"bookmark\">Read More &raquo;<span class=\"screen-reader-text\">Linked List<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":0,"comment_status":"closed","ping_status":"closed","template":"","meta":{"neve_meta_sidebar":"","neve_meta_container":"","neve_meta_enable_content_width":"","neve_meta_content_width":70,"neve_meta_title_alignment":"","neve_meta_author_avatar":"","neve_post_elements_order":"","neve_meta_disable_header":"","neve_meta_disable_footer":"","neve_meta_disable_title":""},"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v20.6 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>Linked List - A Level Computer Science<\/title>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/\" \/>\n<meta property=\"og:locale\" content=\"en_GB\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Linked List - A Level Computer Science\" \/>\n<meta property=\"og:description\" content=\"Linked Lists At its simplest, a linked list is a data structure that contains a series of nodes, where each node is linked to the next node in the list. Each node contains two main parts: the actual data that we want to store, and a pointer to the next node in the list. Linked&hellip;&nbsp;Read More &raquo;Linked List\" \/>\n<meta property=\"og:url\" content=\"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/\" \/>\n<meta property=\"og:site_name\" content=\"A Level Computer Science\" \/>\n<meta property=\"article:modified_time\" content=\"2023-05-03T08:06:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/11\/Single-Linked-List-With-Data-1024x229.jpg\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Estimated reading time\" \/>\n\t<meta name=\"twitter:data1\" content=\"3 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebPage\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/\",\"url\":\"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/\",\"name\":\"Linked List - A Level Computer Science\",\"isPartOf\":{\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#website\"},\"datePublished\":\"2020-06-08T06:23:41+00:00\",\"dateModified\":\"2023-05-03T08:06:21+00:00\",\"breadcrumb\":{\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/#breadcrumb\"},\"inLanguage\":\"en-GB\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/\"]}]},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"A Level Computer Science Home\",\"item\":\"https:\/\/learnlearn.uk\/alevelcs\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linked List\"}]},{\"@type\":\"WebSite\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#website\",\"url\":\"https:\/\/learnlearn.uk\/alevelcs\/\",\"name\":\"A Level Computer Science\",\"description\":\"CIE Specification\",\"publisher\":{\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"https:\/\/learnlearn.uk\/alevelcs\/?s={search_term_string}\"},\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-GB\"},{\"@type\":\"Organization\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#organization\",\"name\":\"A Level Computer Science\",\"url\":\"https:\/\/learnlearn.uk\/alevelcs\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-GB\",\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/learnlearn.uk\/alevelcs\/wp-content\/uploads\/sites\/20\/2019\/09\/LearnLearnLogowhite.png\",\"contentUrl\":\"https:\/\/learnlearn.uk\/alevelcs\/wp-content\/uploads\/sites\/20\/2019\/09\/LearnLearnLogowhite.png\",\"width\":710,\"height\":98,\"caption\":\"A Level Computer Science\"},\"image\":{\"@id\":\"https:\/\/learnlearn.uk\/alevelcs\/#\/schema\/logo\/image\/\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Linked List - A Level Computer Science","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/","og_locale":"en_GB","og_type":"article","og_title":"Linked List - A Level Computer Science","og_description":"Linked Lists At its simplest, a linked list is a data structure that contains a series of nodes, where each node is linked to the next node in the list. Each node contains two main parts: the actual data that we want to store, and a pointer to the next node in the list. Linked&hellip;&nbsp;Read More &raquo;Linked List","og_url":"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/","og_site_name":"A Level Computer Science","article_modified_time":"2023-05-03T08:06:21+00:00","og_image":[{"url":"https:\/\/learnlearn.uk\/ibcs\/wp-content\/uploads\/sites\/25\/2022\/11\/Single-Linked-List-With-Data-1024x229.jpg"}],"twitter_card":"summary_large_image","twitter_misc":{"Estimated reading time":"3 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"WebPage","@id":"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/","url":"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/","name":"Linked List - A Level Computer Science","isPartOf":{"@id":"https:\/\/learnlearn.uk\/alevelcs\/#website"},"datePublished":"2020-06-08T06:23:41+00:00","dateModified":"2023-05-03T08:06:21+00:00","breadcrumb":{"@id":"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/#breadcrumb"},"inLanguage":"en-GB","potentialAction":[{"@type":"ReadAction","target":["https:\/\/learnlearn.uk\/alevelcs\/linked-list\/"]}]},{"@type":"BreadcrumbList","@id":"https:\/\/learnlearn.uk\/alevelcs\/linked-list\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"A Level Computer Science Home","item":"https:\/\/learnlearn.uk\/alevelcs\/"},{"@type":"ListItem","position":2,"name":"Linked List"}]},{"@type":"WebSite","@id":"https:\/\/learnlearn.uk\/alevelcs\/#website","url":"https:\/\/learnlearn.uk\/alevelcs\/","name":"A Level Computer Science","description":"CIE Specification","publisher":{"@id":"https:\/\/learnlearn.uk\/alevelcs\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/learnlearn.uk\/alevelcs\/?s={search_term_string}"},"query-input":"required name=search_term_string"}],"inLanguage":"en-GB"},{"@type":"Organization","@id":"https:\/\/learnlearn.uk\/alevelcs\/#organization","name":"A Level Computer Science","url":"https:\/\/learnlearn.uk\/alevelcs\/","logo":{"@type":"ImageObject","inLanguage":"en-GB","@id":"https:\/\/learnlearn.uk\/alevelcs\/#\/schema\/logo\/image\/","url":"https:\/\/learnlearn.uk\/alevelcs\/wp-content\/uploads\/sites\/20\/2019\/09\/LearnLearnLogowhite.png","contentUrl":"https:\/\/learnlearn.uk\/alevelcs\/wp-content\/uploads\/sites\/20\/2019\/09\/LearnLearnLogowhite.png","width":710,"height":98,"caption":"A Level Computer Science"},"image":{"@id":"https:\/\/learnlearn.uk\/alevelcs\/#\/schema\/logo\/image\/"}}]}},"rttpg_featured_image_url":null,"rttpg_author":{"display_name":"learnlearnadmin","author_link":"https:\/\/learnlearn.uk\/alevelcs\/author\/learnlearnadmin\/"},"rttpg_comment":0,"rttpg_category":null,"rttpg_excerpt":"Linked Lists At its simplest, a linked list is a data structure that contains a series of nodes, where each node is linked to the next node in the list. Each node contains two main parts: the actual data that we want to store, and a pointer to the next node in the list. Linked&hellip;&nbsp;Read&hellip;","_links":{"self":[{"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/pages\/730"}],"collection":[{"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/comments?post=730"}],"version-history":[{"count":7,"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/pages\/730\/revisions"}],"predecessor-version":[{"id":2297,"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/pages\/730\/revisions\/2297"}],"wp:attachment":[{"href":"https:\/\/learnlearn.uk\/alevelcs\/wp-json\/wp\/v2\/media?parent=730"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}