Topic: Linked List Problem / Level: advanced

Problem: Write a function to split a doubly linked list into two lists where one list contains nodes with prime values and the other contains non-prime values.

Run the code to see the output here...