MCPcopy Create free account
hub / github.com/Vishruth-S/CompetitiveCode / main

Function main

GeeksForGeeks/Detect Loop in Linked List/solution.cpp:43–60  ·  view source on GitHub ↗

Driver code*/

Source from the content-addressed store, hash-verified

41
42/* Driver code*/
43int main()
44{
45 /* Start with the empty list */
46 Node* head = NULL;
47
48 push(&head, 20);
49 push(&head, 4);
50 push(&head, 15);
51 push(&head, 10);
52
53 /* Create a loop for testing */
54 head->next->next->next->next = head;
55 if (detectLoop(head))
56 cout << "Loop found";
57 else
58 cout << "No Loop";
59 return 0;
60}

Callers

nothing calls this directly

Calls 2

detectLoopFunction · 0.85
pushFunction · 0.70

Tested by

no test coverage detected