Basically, A linked list that has its tail linked to its head, usually the tail is kept track of since it provides constant access to both the end and the front of the linked list.
ListNode x = new ListNode( value, null); //a ListNode with no next
x.setNext( new ListNode( value, null)); // make its next another ListNode with no next
x.getNext().setNext(x); // set the new node's next to my old node, now you have a circular linked list.
Chat with our AI personalities
I'm sorry brother
The Josephus problem is a problem to locate the place for the last survivour. It shows the power of the circular linked list over the singly linked lists.
image is shared
write pseudocode for link list
Oh, dude, a linear linked list is like a straight line where each element points to the next one, while a circular linked list is like a loop-de-loop rollercoaster where the last element points back to the first one. So, in a linear list, you reach the end and it's like hitting a wall, but in a circular list, you just keep on looping around for eternity. It's like the difference between a dead-end street and a roundabout.