Circular linked list


I am passing the test cases but confuse is there need of using floyd algorithm in this?

@Rakshitgarg99 floyd algorithm can also be used to detect cycles but if you can thing of any other method that is also fine.

can you explain how we done this with floyd because i am facing problem in creating a circular list in course learning i use this:- head->next->next->next->next->next = head->next->next;
to make the circular list and apply the detection and removal but in this linear custom list how we do?

@Rakshitgarg99 you can practice floyd algorithm here https://leetcode.com/problems/linked-list-cycle/ if you are facing trouble with making a circular ll based on input.