Topic: Linked List Problem / Level: advanced

Problem: How do you split a circular singly linked list into two lists, one containing prime-numbered nodes and the other containing composite-numbered nodes?

Run the code to see the output here...