Program testing can be used to show the presence of bugs, but never to show their absence. Edsger Dijkstra

Detect and Remove Loop

Language Java | Level Intermediate | Category Data structure | September 5, 2015 11:57 pm

Data structure Description

The singly linked list contains a sequence of nodes which each node contains data and link to the next node. The last node points to the null value. Write a program to detect and remove the loop in the singly linked list. If the linked list does not contain any loop or cycle, print the appropriate message.



Linked List: 101-->201-->301-->401
Linked List is not cyclic, no loop or cycle found



No comments available!

Please login to add comments.