Linked list test cyclicity