{"id":26809,"date":"2017-12-24T15:38:23","date_gmt":"2017-12-24T10:08:23","guid":{"rendered":"https:\/\/www.wikitechy.com\/technology\/?p=26809"},"modified":"2017-12-24T15:46:09","modified_gmt":"2017-12-24T10:16:09","slug":"circular-linked-list-introduction-applications","status":"publish","type":"post","link":"https:\/\/www.wikitechy.com\/technology\/circular-linked-list-introduction-applications\/","title":{"rendered":"Circular Linked List | Set 1 (Introduction and Applications)"},"content":{"rendered":"<p>We have discussed singly and doubly linked lists in the following posts.<\/p>\n<p><a href=\"http:\/\/quiz.geeksforgeeks.org\/linked-list-set-1-introduction\/\" target=\"_blank\" rel=\"noopener noreferrer\">Introduction to Linked List <\/a>&amp; <a href=\"http:\/\/quiz.geeksforgeeks.org\/linked-list-set-2-inserting-a-node\/\" target=\"_blank\" rel=\"noopener noreferrer\">Insertion<\/a><span id=\"more-142787\"><\/span><br \/>\n<a title=\"Permanent link to Doubly Linked List | Set 1 (Introduction and Insertion)\" href=\"http:\/\/quiz.geeksforgeeks.org\/doubly-linked-list\/\" rel=\"bookmark noopener\" target=\"_blank\">Doubly Linked List Introduction and Insertion<\/a><\/p>\n<p><em><strong>Circular linked list<\/strong> is a linked list where all nodes are connected to form a circle. There is no NULL at the end. A circular linked list can be a singly circular linked list or doubly circular linked list.<\/em><\/p>\n<p><img fetchpriority=\"high\" decoding=\"async\" class=\"aligncenter size-full wp-image-26857\" src=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/06\/cll_inserted.png\" alt=\"Circular Linked List | Set 1 (Introduction and Applications)\" width=\"887\" height=\"187\" srcset=\"https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/06\/cll_inserted.png 887w, https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/06\/cll_inserted-300x63.png 300w, https:\/\/www.wikitechy.com\/technology\/wp-content\/uploads\/2017\/06\/cll_inserted-768x162.png 768w\" sizes=\"(max-width: 887px) 100vw, 887px\" \/><\/p>\n<p>&nbsp;<\/p>\n<p><strong>Advantages of Circular Linked Lists:<\/strong><br \/>\n<strong>1) <\/strong>Any node can be a starting point. We can traverse the whole list by starting from any point. We just need to stop when the first visited node is visited again.<\/p>\n<p><strong>2) <\/strong>Useful for implementation of queue. Unlike <a href=\"http:\/\/quiz.geeksforgeeks.org\/queue-set-2-linked-list-implementation\/\" target=\"_blank\" rel=\"noopener noreferrer\">this <\/a>implementation, we don\u2019t need to maintain two pointers for front and rear if we use circular linked list. We can maintain a pointer to the last inserted node and front can always be obtained as next of last.<\/p>\n<p><strong>3)<\/strong> Circular lists are useful in applications to repeatedly go around the list. For example, when multiple applications are running on a PC, it is common for the operating system to put the running applications on a list and then to cycle through them, giving each of them a slice of time to execute, and then making them wait while the CPU is given to another application. It is convenient for the operating system to use a circular list so that when it reaches the end of the list it can cycle around to the front of the list. (Source <a href=\"http:\/\/web.eecs.utk.edu\/~bvz\/cs140\/notes\/Dllists\/\" target=\"_blank\" rel=\"noopener noreferrer\">http:\/\/web.eecs.utk.edu\/~bvz\/cs140\/notes\/Dllists\/<\/a>)<\/p>\n<p><strong>4)<\/strong> Circular Doubly Linked Lists are used for implementation of advanced data structures like <a href=\"http:\/\/en.wikipedia.org\/wiki\/Fibonacci_heap\" target=\"_blank\" rel=\"noopener noreferrer\">Fibonacci Heap<\/a>.<\/p>\n[ad type=&#8221;banner&#8221;]\n","protected":false},"excerpt":{"rendered":"<p>Circular Linked List (Introduction and Applications) &#8211; Circular Linked List &#8211; Circular linked list is a linked list where all nodes are connected <\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[79477,79476],"tags":[83692,83694,83693,80092,80095,80091,80096,83695,80093,80433,79628,80094,79561,79500,83696],"class_list":["post-26809","post","type-post","status-publish","format-standard","hentry","category-circular-linked-list","category-linked-list","tag-advantage-of-circular-linked-list","tag-application-of-singly-linked-list","tag-applications-of-doubly-linked-list","tag-circular-doubly-linked-list","tag-circular-linked-list-advantages","tag-circular-linked-list-algorithm","tag-circular-linked-list-algorithm-pdf","tag-circular-linked-list-application","tag-circular-linked-list-c","tag-circular-linked-list-geeksforgeeks","tag-circular-linked-list-in-data-structure","tag-circular-linked-list-insertion-and-deletion","tag-circular-linked-list-java","tag-circular-linked-list-program-in-c","tag-circular-singly-linked-list-in-data-structure"],"_links":{"self":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/26809","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/comments?post=26809"}],"version-history":[{"count":0,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/posts\/26809\/revisions"}],"wp:attachment":[{"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/media?parent=26809"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/categories?post=26809"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.wikitechy.com\/technology\/wp-json\/wp\/v2\/tags?post=26809"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}