@@ -0,0 +1,450 @@
+/*%0A  Insert Node at the end of a linked list%0A  head pointer input could be NULL as well for empty list%0A  Node is defined as%0A  class Node %7B%0A     int data;%0A     Node next;%0A  %7D%0A*/%0Aint HasCycle(Node head) %7B%0A    Node runner = head;%0A%0A    while (runner != null)%7B%0A        head = head.next;%0A        runner = runner.next;%0A        if  (runner == null) %7B return 0; %7D%0A        runner = runner.next;%0A        if (head == runner) %7B return 1; %7D%0A    %7D%0A%0A    return 0;%0A%7D%0A

solve detect cycles