{"id":5899,"date":"2021-11-08T11:15:08","date_gmt":"2021-11-08T11:15:08","guid":{"rendered":"https:\/\/www.prepbytes.com\/blog\/?p=5899"},"modified":"2023-07-27T12:29:34","modified_gmt":"2023-07-27T12:29:34","slug":"josephus-circle-using-circular-linked-list","status":"publish","type":"post","link":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/","title":{"rendered":"Josephus Circle Using Circular Linked List"},"content":{"rendered":"<p><img decoding=\"async\" src=\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1645012402924-Article_210.png\" alt=\"\" \/><\/p>\n<p>Josephus problem circular linked list is another name for Josephus problem linked list. This problem has become a common topic in recent interviews. Let&#8217;s explore the linked list approach to solving the Josephus problem.<\/p>\n<p>As we have seen Different types of linked lists, We are aware of Circular linked lists. In this article, we are seeing an approach to Josephus problem circular linked list<\/p>\n<h2>How to Solve Josephus Problem Using Circular Linked List<\/h2>\n<p>In Josephus problem circular linked list N people are standing in a circle waiting to get executed. The counting begins at some point in the circle and proceeds around the circle in a fixed direction. In each step, a certain number of people are skipped, and the next person is executed. The elimination proceeds around the circle (which is becoming smaller and smaller as the executed people are removed), until only the last person remains, who is given freedom.<\/p>\n<p>Given the total number of persons <strong>N<\/strong> and the number <strong>M<\/strong>, which indicates that <strong>M-1<\/strong> persons are skipped and the Mth person is killed in the circle, your task is to choose the place in the initial circle so that you are the last one remaining (survive).<\/p>\n<h3>Understanding of  Josephus Problem Circular Linked List  with Example<\/h3>\n<p>Let us understand the problem with the help of an example:<\/p>\n<p>Let&#8217;s take an input, where N = 5 and M = 3.<\/p>\n<p><img decoding=\"async\" src=\"https:\/\/prepbytes.com\/blog\/wp-content\/uploads\/2021\/10\/p_1-8.jpg\" alt=\"\" \/><\/p>\n<p>At this point, we have understood the problem statement ofJosephus problem circular linked list. Now we will try to formulate an approach to this problem.<\/p>\n<p>Before moving to the approach ofJosephus problem circular linked list, try to think about how you can approach this problem.<\/p>\n<ul>\n<li>If stuck, no problem, we will thoroughly see how we can approach this problem in the next section.<\/li>\n<\/ul>\n<p>Let\u2019s move to the approach section.<\/p>\n<h3>Approach of Josephus Problem Using Circular Linked List<\/h3>\n<ul>\n<li>We will create a circular linked list of size N, and each node will contain its position number in the list as its data.<\/li>\n<li>Then, we will traverse the list and, every time delete the Mth node till we are left with only one node.<\/li>\n<li>The left node at last is our solution to the problem.<\/li>\n<\/ul>\n<h3>Algorithm of Josephus Problem using Circular Linked List<\/h3>\n<ol>\n<li>Create a new node and store its address in the <strong>head<\/strong> and also initialize a <strong>prev<\/strong> variable with the <strong>head<\/strong>.<\/li>\n<li>Run a loop and create a linked list of size <strong>N<\/strong>, attaching the nodes created in each iteration to the end of <strong>prev<\/strong> and then update the <strong>prev<\/strong>.<\/li>\n<li>After the loop is executed, connect the last node with the <strong>head<\/strong> of the list, i.e., <strong>prev-&gt;next = head<\/strong>.<\/li>\n<li>Initialize two pointers <strong>ptr1<\/strong> and <strong>ptr2<\/strong> with <strong>head<\/strong>.<\/li>\n<li>Run a while loop till the next node of <strong>ptr1<\/strong> is <strong>ptr1<\/strong> itself and inside the loop,<\/p>\n<ul>\n<li>Initialize variable <strong>count<\/strong> with 1.<\/li>\n<li>Run a while loop till the <strong>count<\/strong> is not equal to <strong>M<\/strong>.<\/li>\n<li>Inside the loop, copy <strong>ptr2<\/strong> in <strong>ptr1<\/strong>, move <strong>ptr1<\/strong> forward by one node and increase <strong>count<\/strong> by one.<\/li>\n<li>After the inner loop ends, remove the M<sup>th<\/sup> node, i.e., <strong>ptr2-&gt;next = ptr1-&gt;next<\/strong>.<\/li>\n<\/li>\n<li>Update <strong>ptr1<\/strong> with <strong>ptr2-&gt;next<\/strong>.<\/li>\n<\/ul>\n<\/li>\n<li>After the loop ends, print the data of the last node left, i.e., data of <strong>ptr1<\/strong>.<\/li>\n<\/ol>\n<h3>Dry Run of Josephus Problem Circular Linked List<\/h3>\n<p><img decoding=\"async\" src=\"https:\/\/prepbytes.com\/blog\/wp-content\/uploads\/2021\/10\/p_2-8.jpg\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/prepbytes.com\/blog\/wp-content\/uploads\/2021\/10\/p_3-6.jpg\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/prepbytes.com\/blog\/wp-content\/uploads\/2021\/10\/p_4-4.jpg\" alt=\"\" \/><\/p>\n<p><img decoding=\"async\" src=\"https:\/\/prepbytes.com\/blog\/wp-content\/uploads\/2021\/10\/p_5-3.jpg\" alt=\"\" \/><\/p>\n<h3>Code Implementation of Josephus Problem using Circular Linked List<\/h3>\n\n<p><strong>Output of Josephus problem circular linked list<\/strong><\/p>\n<pre><code>Last person left is 4<\/code><\/pre>\n<p><strong>Time Complexity of Josephus problem circular linked list:<\/strong> O(M*N), where M and N are the inputs.<\/p>\n<p><strong>Conclusion of Josephus problem using circular linked list<\/strong><br \/>\nSo, in the aforementioned article, we attempted to explain how to most effectively solve the Josephus problem using a circular linked list. You can click on this link to access more questions on Linked List, which is maintained by PrepBytes&#8217; knowledgeable mentors.<\/p>\n<h2>FAQs<\/h2>\n<p><strong>Q1. What is a circular linked list?<\/strong><br \/>\n<strong>Ans.<\/strong> A circular linked list is a linked list which is connected by the ends to form a circle-like structure.<\/p>\n<p><strong>Q2. What is the time complexity of a circular Linked list?<\/strong><br \/>\n<strong>Ans.<\/strong> Operations such as Insertion which do not require traversal has a time complexity of O(1) and if the traversal is required then the time complexity is O(n).<\/p>\n<p><strong>Q3. How many null pointers exist in the circular linked list?<\/strong><br \/>\n<strong>Ans.<\/strong> A circular Linked list is a doubly linked list which not only points to the next node but also points to the previous node as well. That\u2019s why a circular linked list contains two null pointers.<\/p>\n<p><strong>Q4. How to implement the circular singly linked list?<\/strong><br \/>\n<strong>Ans.<\/strong> To implement a circular singly linked list, we take an external pointer which points to the last node and the last next will be the first node.<\/p>\n<table width=\"641\">\n<tbody>\n<tr>\n<td colspan=\"2\" width=\"641\" style=\"text-align: center\"><strong>Related Articles<\/strong><\/td>\n<\/tr>\n<tr>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/doubly-circular-linked-list-introduction-and-insertion\/\">Doubly circular linked list in data structure<\/a><\/td>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/advantages-disadvantages-and-uses-of-a-doubly-linked-list\/\">Application of doubly linked list<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/applications-of-linked-list-data-structure\/\">Applications of linked list<\/a><\/td>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/difference-between-a-singly-linked-list-and-a-doubly-linked-list\/\">Singly linked list vs doubly linked list<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/advantage-and-disadvantage-of-linked-list-over-array\/\">Advantages and disadvantages of linked list<\/a><\/td>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/menu-driven-program-for-all-operations-on-doubly-linked-list-in-c\/\">Doubly linked list all operations in C<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/binary-search\/binary-search-on-linked-list\/\">Binary search in linked list<\/a><\/td>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/bubble-sort-for-linked-list-by-swapping-nodes\/\">Bubble sort linked list<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/delete-a-node-in-doubly-linked-list\/\">Deletion in doubly linked list<\/a><\/td>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/delete-middle-of-linked-list\/\">Delete the middle node of a linked list<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/adding-two-polynomials-using-linked-list\/\">Polynomial addition using linked list<\/a><\/td>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/find-the-smallest-and-largest-elements-in-a-singly-linked-list\/\">Find max value and min value in linked list<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/insert-a-node-at-a-specific-position-in-a-linked-list\/\">Insert a node at a specific position in a linked list<\/a><\/td>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/swap-nodes-in-a-linked-list-without-swapping-data\/\">Swap nodes in linked list<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/add-two-numbers-represented-by-linked-lists-set-1\/\">Add two numbers represented by linked lists<\/a><\/td>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/find-the-first-node-of-the-loop-in-a-linked-list\/\">Find starting point of loop in linked list<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/merge-sort-on-a-singly-linked-list\/\">Merge sort linked list<\/a><\/td>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/delete-a-node-at-a-given-position\/\">Delete a node from linked list at a given position<\/a><\/td>\n<\/tr>\n<tr>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/linked-list\/remove-duplicates-from-an-unsorted-linked-list\/\">Remove duplicates from unsorted linked list<\/a><\/td>\n<td width=\"321\"><a href=\"https:\/\/prepbytes.com\/blog\/python\/python-program-to-reverse-a-linked-list\/\">Reverse a linked list in Python<\/a><\/td>\n<\/tr>\n<\/tbody>\n<\/table>\n","protected":false},"excerpt":{"rendered":"<p>Josephus problem circular linked list is another name for Josephus problem linked list. This problem has become a common topic in recent interviews. Let&#8217;s explore the linked list approach to solving the Josephus problem. As we have seen Different types of linked lists, We are aware of Circular linked lists. In this article, we are [&hellip;]<\/p>\n","protected":false},"author":52,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_monsterinsights_skip_tracking":false,"_monsterinsights_sitenote_active":false,"_monsterinsights_sitenote_note":"","_monsterinsights_sitenote_category":0,"footnotes":""},"categories":[125],"tags":[],"class_list":["post-5899","post","type-post","status-publish","format-standard","hentry","category-linked-list"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v25.8 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to Solve Josephus Problem Using Circular Linked List<\/title>\n<meta name=\"description\" content=\"Learn how to solve Josephus circle problem using a circular linked list.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to Solve Josephus Problem Using Circular Linked List\" \/>\n<meta property=\"og:description\" content=\"Learn how to solve Josephus circle problem using a circular linked list.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/\" \/>\n<meta property=\"og:site_name\" content=\"PrepBytes Blog\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prepbytes0211\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-11-08T11:15:08+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2023-07-27T12:29:34+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1645012402924-Article_210.png\" \/>\n<meta name=\"author\" content=\"Prepbytes\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"Prepbytes\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"6 minutes\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"Article\",\"@id\":\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#article\",\"isPartOf\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/\"},\"author\":{\"name\":\"Prepbytes\",\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/person\/3f7dc4ae851791d5947a7f99df363d5e\"},\"headline\":\"Josephus Circle Using Circular Linked List\",\"datePublished\":\"2021-11-08T11:15:08+00:00\",\"dateModified\":\"2023-07-27T12:29:34+00:00\",\"mainEntityOfPage\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/\"},\"wordCount\":928,\"commentCount\":0,\"publisher\":{\"@id\":\"http:\/\/43.205.93.38\/#organization\"},\"image\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1645012402924-Article_210.png\",\"articleSection\":[\"Linked list articles\"],\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"CommentAction\",\"name\":\"Comment\",\"target\":[\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#respond\"]}]},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/\",\"url\":\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/\",\"name\":\"How to Solve Josephus Problem Using Circular Linked List\",\"isPartOf\":{\"@id\":\"http:\/\/43.205.93.38\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#primaryimage\"},\"image\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#primaryimage\"},\"thumbnailUrl\":\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1645012402924-Article_210.png\",\"datePublished\":\"2021-11-08T11:15:08+00:00\",\"dateModified\":\"2023-07-27T12:29:34+00:00\",\"description\":\"Learn how to solve Josephus circle problem using a circular linked list.\",\"breadcrumb\":{\"@id\":\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#breadcrumb\"},\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/\"]}]},{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#primaryimage\",\"url\":\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1645012402924-Article_210.png\",\"contentUrl\":\"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1645012402924-Article_210.png\"},{\"@type\":\"BreadcrumbList\",\"@id\":\"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#breadcrumb\",\"itemListElement\":[{\"@type\":\"ListItem\",\"position\":1,\"name\":\"Home\",\"item\":\"http:\/\/43.205.93.38\/\"},{\"@type\":\"ListItem\",\"position\":2,\"name\":\"Linked list articles\",\"item\":\"https:\/\/prepbytes.com\/blog\/category\/linked-list\/\"},{\"@type\":\"ListItem\",\"position\":3,\"name\":\"Josephus Circle Using Circular Linked List\"}]},{\"@type\":\"WebSite\",\"@id\":\"http:\/\/43.205.93.38\/#website\",\"url\":\"http:\/\/43.205.93.38\/\",\"name\":\"PrepBytes Blog\",\"description\":\"ONE-STOP RESOURCE FOR EVERYTHING RELATED TO CODING\",\"publisher\":{\"@id\":\"http:\/\/43.205.93.38\/#organization\"},\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":{\"@type\":\"EntryPoint\",\"urlTemplate\":\"http:\/\/43.205.93.38\/?s={search_term_string}\"},\"query-input\":{\"@type\":\"PropertyValueSpecification\",\"valueRequired\":true,\"valueName\":\"search_term_string\"}}],\"inLanguage\":\"en-US\"},{\"@type\":\"Organization\",\"@id\":\"http:\/\/43.205.93.38\/#organization\",\"name\":\"Prepbytes\",\"url\":\"http:\/\/43.205.93.38\/\",\"logo\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/logo\/image\/\",\"url\":\"https:\/\/blog.prepbytes.com\/wp-content\/uploads\/2025\/07\/uzxxllgloialmn9mhwfe.webp\",\"contentUrl\":\"https:\/\/blog.prepbytes.com\/wp-content\/uploads\/2025\/07\/uzxxllgloialmn9mhwfe.webp\",\"width\":160,\"height\":160,\"caption\":\"Prepbytes\"},\"image\":{\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/logo\/image\/\"},\"sameAs\":[\"https:\/\/www.facebook.com\/prepbytes0211\/\",\"https:\/\/www.instagram.com\/prepbytes\/\",\"https:\/\/www.linkedin.com\/company\/prepbytes\/\",\"https:\/\/www.youtube.com\/channel\/UC0xGnHDrjUM1pDEK2Ka5imA\"]},{\"@type\":\"Person\",\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/person\/3f7dc4ae851791d5947a7f99df363d5e\",\"name\":\"Prepbytes\",\"image\":{\"@type\":\"ImageObject\",\"inLanguage\":\"en-US\",\"@id\":\"http:\/\/43.205.93.38\/#\/schema\/person\/image\/\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/232042cd1a1ea0e982c96d2a2ec93fb70a8e864e00784491231e7bfe5a9e06b5?s=96&d=mm&r=g\",\"contentUrl\":\"https:\/\/secure.gravatar.com\/avatar\/232042cd1a1ea0e982c96d2a2ec93fb70a8e864e00784491231e7bfe5a9e06b5?s=96&d=mm&r=g\",\"caption\":\"Prepbytes\"},\"url\":\"https:\/\/prepbytes.com\/blog\/author\/gourav-jaincollegedekho-com\/\"}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"How to Solve Josephus Problem Using Circular Linked List","description":"Learn how to solve Josephus circle problem using a circular linked list.","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:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/","og_locale":"en_US","og_type":"article","og_title":"How to Solve Josephus Problem Using Circular Linked List","og_description":"Learn how to solve Josephus circle problem using a circular linked list.","og_url":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/","og_site_name":"PrepBytes Blog","article_publisher":"https:\/\/www.facebook.com\/prepbytes0211\/","article_published_time":"2021-11-08T11:15:08+00:00","article_modified_time":"2023-07-27T12:29:34+00:00","og_image":[{"url":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1645012402924-Article_210.png","type":"","width":"","height":""}],"author":"Prepbytes","twitter_card":"summary_large_image","twitter_misc":{"Written by":"Prepbytes","Est. reading time":"6 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#article","isPartOf":{"@id":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/"},"author":{"name":"Prepbytes","@id":"http:\/\/43.205.93.38\/#\/schema\/person\/3f7dc4ae851791d5947a7f99df363d5e"},"headline":"Josephus Circle Using Circular Linked List","datePublished":"2021-11-08T11:15:08+00:00","dateModified":"2023-07-27T12:29:34+00:00","mainEntityOfPage":{"@id":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/"},"wordCount":928,"commentCount":0,"publisher":{"@id":"http:\/\/43.205.93.38\/#organization"},"image":{"@id":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#primaryimage"},"thumbnailUrl":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1645012402924-Article_210.png","articleSection":["Linked list articles"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/","url":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/","name":"How to Solve Josephus Problem Using Circular Linked List","isPartOf":{"@id":"http:\/\/43.205.93.38\/#website"},"primaryImageOfPage":{"@id":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#primaryimage"},"image":{"@id":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#primaryimage"},"thumbnailUrl":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1645012402924-Article_210.png","datePublished":"2021-11-08T11:15:08+00:00","dateModified":"2023-07-27T12:29:34+00:00","description":"Learn how to solve Josephus circle problem using a circular linked list.","breadcrumb":{"@id":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#primaryimage","url":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1645012402924-Article_210.png","contentUrl":"https:\/\/prepbytes-misc-images.s3.ap-south-1.amazonaws.com\/assets\/1645012402924-Article_210.png"},{"@type":"BreadcrumbList","@id":"https:\/\/prepbytes.com\/blog\/josephus-circle-using-circular-linked-list\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"http:\/\/43.205.93.38\/"},{"@type":"ListItem","position":2,"name":"Linked list articles","item":"https:\/\/prepbytes.com\/blog\/category\/linked-list\/"},{"@type":"ListItem","position":3,"name":"Josephus Circle Using Circular Linked List"}]},{"@type":"WebSite","@id":"http:\/\/43.205.93.38\/#website","url":"http:\/\/43.205.93.38\/","name":"PrepBytes Blog","description":"ONE-STOP RESOURCE FOR EVERYTHING RELATED TO CODING","publisher":{"@id":"http:\/\/43.205.93.38\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"http:\/\/43.205.93.38\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"http:\/\/43.205.93.38\/#organization","name":"Prepbytes","url":"http:\/\/43.205.93.38\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/43.205.93.38\/#\/schema\/logo\/image\/","url":"https:\/\/blog.prepbytes.com\/wp-content\/uploads\/2025\/07\/uzxxllgloialmn9mhwfe.webp","contentUrl":"https:\/\/blog.prepbytes.com\/wp-content\/uploads\/2025\/07\/uzxxllgloialmn9mhwfe.webp","width":160,"height":160,"caption":"Prepbytes"},"image":{"@id":"http:\/\/43.205.93.38\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/prepbytes0211\/","https:\/\/www.instagram.com\/prepbytes\/","https:\/\/www.linkedin.com\/company\/prepbytes\/","https:\/\/www.youtube.com\/channel\/UC0xGnHDrjUM1pDEK2Ka5imA"]},{"@type":"Person","@id":"http:\/\/43.205.93.38\/#\/schema\/person\/3f7dc4ae851791d5947a7f99df363d5e","name":"Prepbytes","image":{"@type":"ImageObject","inLanguage":"en-US","@id":"http:\/\/43.205.93.38\/#\/schema\/person\/image\/","url":"https:\/\/secure.gravatar.com\/avatar\/232042cd1a1ea0e982c96d2a2ec93fb70a8e864e00784491231e7bfe5a9e06b5?s=96&d=mm&r=g","contentUrl":"https:\/\/secure.gravatar.com\/avatar\/232042cd1a1ea0e982c96d2a2ec93fb70a8e864e00784491231e7bfe5a9e06b5?s=96&d=mm&r=g","caption":"Prepbytes"},"url":"https:\/\/prepbytes.com\/blog\/author\/gourav-jaincollegedekho-com\/"}]}},"_links":{"self":[{"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/posts\/5899","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/users\/52"}],"replies":[{"embeddable":true,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/comments?post=5899"}],"version-history":[{"count":12,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/posts\/5899\/revisions"}],"predecessor-version":[{"id":17382,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/posts\/5899\/revisions\/17382"}],"wp:attachment":[{"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/media?parent=5899"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/categories?post=5899"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prepbytes.com\/blog\/wp-json\/wp\/v2\/tags?post=5899"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}