Data structure circular linked list knowledge to implement Joseph ring (C language)