Cycle detection and removal of cycle problem

what test case i am missing ???

hello @anujsharmabadboy

in line four u are accessing head->next->next , what if head->next is null then in that case it will segfault

thanks, buddy …