The revised Add to Front for a list of doubly linked Nodes.
Add data value 3 to this list:

we have to
-
create a new Node with data value 3:
Node tmp = new Node(3);
-
Make tmp.next reference the first node and tmp.prev reference head:
tmp.next = head.next;
So tmp.next will then reference the Node with value 10 just like head.next.
-
Now head.next should reference the new Node
head.next = tmp;