In this question, I suppose, I should be provided a head node as argument and I should be expected to code the function which takes the linked list and detects the cycle. How could I be expected to first create a cycle, then find it and break it!!
Problem with this question
Hi ,you can just connect the last node to any node in the middle and test it.