Algorithm to find duplicates in a linked list

Algorithm to find duplicates in a linked list with time colexity O(N)
and space complexity O(1)