Doubt in Floyd Cycle Video

how we can take the input of linked list containing cycle ?

Hello,

What you can do is while inserting a new node check if it already occurred in the link list before or not:

  1. if yes, then it means that numbers has started repeating.
    then point the last node to node containing that element.

  2. if no, then keep inserting the new node to the last of linked list.

Hope, this would help.
Give a like, if it is satisfied.