Topic: Linked List Problem / Level: advanced

Problem: How do you split a circular singly linked list into two lists where one contains prime-indexed nodes and the other contains composite-indexed nodes?

Run the code to see the output here...