Topic: Linked List Problem / Level: advanced

Problem: How do you rearrange nodes in a doubly linked list such that all nodes with prime-numbered positions come before composite-numbered positions?

Run the code to see the output here...