In circular linked list, implement a method to insert a node at head. Return the new list head.

*x = indicates head node

`Insert 1 ==> *1`

`Insert 2 ==> 2->1->*2`

`Insert 3 ==> 3->2->1->*3`

Need a **hand?** Try out these hints, one at a time.

The key here is to find the

`node`

which points to the `head node`

and then insert a node in between the two nodes and return this as the `head node`

.
1. Create a `new node`

.

2. If the `head node`

is `null`

, return this `new node`

as the `head node`

.

3. Else, traverse to the node which points to the `head node`

. Let's call it `current node`

.

4. Assign `head node`

to the `new node's next`

.

5. Assign `new node`

to the `current node's next`

and return the `new node`

as the `head node`

.

public ListNode insertAtHead(ListNode head, int data) { }

**C**

**Java**

**Python**