Do not use the hash map, you only need two pointers, used for "the tortoise and the hare" algorithm. You can refer to my home page doc for detail explanation and proof to solve following three problems:

Detect if there exists a cycle in the list;

Length of the cycle

The beginning node of the cycle
Thanks