Driver code*/
| 52 | |
| 53 | /* Driver code*/ |
| 54 | int main() |
| 55 | { |
| 56 | /* Start with the empty list */ |
| 57 | Node* head = NULL; |
| 58 | |
| 59 | push(&head, 20); |
| 60 | push(&head, 4); |
| 61 | push(&head, 15); |
| 62 | push(&head, 15); |
| 63 | push(&head, 10); |
| 64 | |
| 65 | /* Create a loop for testing */ |
| 66 | head->next->next->next = head; |
| 67 | if (detectLoop(head)) |
| 68 | cout << "Loop found"; |
| 69 | else |
| 70 | cout << "No Loop"; |
| 71 | return 0; |
| 72 | } |
nothing calls this directly
no test coverage detected