# Linked List Cycle

Given a linked list, determine if it has a cycle in it.

The following algorithm uses a hash map to keep track of nodes visited. The time and space complexity is both O(n) where n is the number of nodes in the list.

Given a linked list, determine if it has a cycle in it.

The following algorithm uses a hash map to keep track of nodes visited. The time and space complexity is both O(n) where n is the number of nodes in the list.