solution: linked list cycle 1