A cycle/loop in a single linked list can be detected easily if there's a node which points to some other previous node in the list or to itself. The program below detects the cycle in the single linked list with 'head' as root node pointer passed to the function cycledetection(), and will return the Boolean true if a cycle is detected or else false.
Who am i
Md Shadab Ansari.
Student of Computer Application
The main objective behind the creation of this blog is to share my little knowledge of Computer Science. I have completed my graduation in Bachelor of Science with honors in Computer Science and currently I'm doing Master of Computer Application.
I am very much into programming and like to learn new things. Through this blog, I will try to share my academics courses which includes Programming, Data Structures, Operating System, Networking, Mathematics, many more which might help everyone. .