Skip to content

A function that determines if a singly linked list is circular and if it is, we are going to return the node where the cycle begins. This solution is based off of Robert Floyd’s algorithm

License

Notifications You must be signed in to change notification settings

OKaemii/C-Floyds-Algorithm

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 

Repository files navigation

C-Floyds-Algorithm

A function that determines if a singly linked list is circular and if it is, we are going to return the node where the cycle begins. This solution is based off of Robert Floyd’s algorithm.

alt text

Big-O Complexity

The time complexity of this algorithm is linear: O(n).
The space complexity of this algorithm is constant: O(1).

About

A function that determines if a singly linked list is circular and if it is, we are going to return the node where the cycle begins. This solution is based off of Robert Floyd’s algorithm

Topics

Resources

License

Stars

Watchers

Forks

Languages