public static void main(String args[]){

        CopyLinkListWIthArbitPointer cll = new CopyLinkListWIthArbitPointer();

        RandomListNode randomListNode = new RandomListNode(-1);
        RandomListNode randomListNode1 = new RandomListNode(4);
        RandomListNode randomListNode2 = new RandomListNode(8);
        RandomListNode randomListNode3 = new RandomListNode(-3);
        RandomListNode randomListNode4 = new RandomListNode(7);
        randomListNode.next = randomListNode1;
        randomListNode1.next = randomListNode2;
        randomListNode2.next = randomListNode3;
        randomListNode3.next = randomListNode4;

        randomListNode.random = randomListNode1;
        randomListNode2.random = randomListNode3;
        randomListNode1.random = randomListNode;
        cll.copyRandomList(randomListNode);
    }
Date 03/24/2016
@author Tushar Roy

A linked list is given such that each node contains an additional random pointer which could point
to any node in the list or null. Return a deep copy of the list.

Time complexity is O(n)
Space complexity is O(1)

https://leetcode.com/problems/copy-list-with-random-pointer/
src/com/interview/linklist/CopyLinkListWIthArbitPointer.java