Topic: Linked List Problem / Level: advanced

Problem: Implement a function to rotate a doubly linked list such that every third node becomes the new head while maintaining the list structure.

Run the code to see the output here...