Link list, queue, stack, trees, files, graphs
One possible answer is to add a flag to each element of the list. You could then traverse the list, starting at the head and tagging each element as you encounter it. If you ever encountered an element that was already tagged, you would know that you had already visited it and that there existed a loop in the linked list.
The following algorithm will find the loop:
Syntax Error: errors generated by compiler at the time of compilation of program. Logical error: errors in program logic. Runtime error: An error that occurs during the execution of a program, Runtime errors indicate bugs in the program
A tree is a recursive structure that usually maps an ordered set of data from an internal definition to some data space. Tree parts are often named after their contemporaries in family trees; trees contain nodes known as parent, child, and sibling. Trees are made of nodes, which can contain both data to be stored and always link to further levels in the tree. Trees are often formed from a single node known as root; alternatively, trees may be built from a set of original nodes--this is known as a forest of trees