Topic: Linked List Problem / Level: advanced

Problem: How do you rearrange nodes in a circular doubly linked list so that all nodes with prime values appear before nodes with composite values?

Run the code to see the output here...