Topic: Linked List Problem / Level: advanced

Problem: How do you rearrange nodes in a multilevel circular singly linked list such that all prime-numbered nodes appear before composite-numbered nodes?

Run the code to see the output here...