Test cases are not passing

why my test cases are not passing this is my code
void display(Node head)
{
if(head==null)
{
System.out.println(“link list is empty”);
}
else
{
Node temp=head;
while(temp!=null)
{
System.out.println(temp.data);
temp=temp.next;
}
}
}
}
quistion

Hey @missroy test cases are not passing since first you have to detect the circular cycle the remove it and take linkedlist input as a circular LL not Normal LL.

I hope I’ve cleared your doubt. I ask you to please rate your experience here
Your feedback is very important. It helps us improve our platform and hence provide you
the learning experience you deserve.

On the off chance, you still have some questions or not find the answers satisfactory, you may reopen
the doubt.