Topic: Linked List Problem / Level: advanced

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

Run the code to see the output here...