Skip to content

Latest commit

 

History

History
62 lines (38 loc) · 1.61 KB

File metadata and controls

62 lines (38 loc) · 1.61 KB

Data-Structures And Algorithms

01. Circular Linked Lists -- Append and Prepend

Circular Linked List append and prepend method 
Append - Add the Node from end of list
Prepend - Add the Node from front of the list

02. Circular Linked Lists -- Remove Node

Circular Linked Lists -- Remove Node
It will remove the Node from the list

03. Circular Linked Lists -- Split List

Circular Linked Lists -- Split List
It will split the Circular Linked List into two Circular Linked List

04. Circular Linked Lists -- Josephus Problem

Circular Linked Lists -- Josephus Problem
Josephus problem will remove every node from the given Circular Linked List of the given step until only one Node left in the list

Example:

Circular Linked List :
                        1
                        2
                        3
                        4
                        5
                        6

step = 2

so the step start from head of the list 

2 is Node where step meet
remove : 2

4 is Node where step meet
remove : 4

6 is Node where step meet
remove : 6

since, it is cicular linked list it will circular again and remove the step Node until only one Node left

3 is Node where step meet
remove : 3

Only one Node left : which is 5

05. Circular Linked Lists -- Is Circular Linked List

Circular Linked Lists -- Is Circular Linked List

It will check the list which is given is circular or not

we can check this by giving Singly and Doubly linked list to verify Circular Linked List