Topic: Linked List Problem / Level: advanced

Problem: Write a function to split a singly linked list into two lists where one contains prime-numbered positions and the other contains composite-numbered positions.

Run the code to see the output here...