Driver code*/
| 41 | |
| 42 | /* Driver code*/ |
| 43 | int 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 | } |
nothing calls this directly
no test coverage detected