public RandomListNode copyRandomList(RandomListNode head) {
        if (head == null) {
            return null;
        }

        RandomListNode current = head;
        while (current != null) {
            RandomListNode newNode = new RandomListNode(current.label);
            newNode.next = current.next;
            newNode.random = current.random;
            current.next = newNode;
            current = newNode.next;
        }

        current = head;
        while (current != null) {
            RandomListNode next = current.next;
            if (next.random != null) {
                next.random = next.random.next;
            }
            current = current.next.next;
        }

        current = head;
        RandomListNode dummy = new RandomListNode(0);
        RandomListNode newCurrent = dummy;
        while (current != null) {
            newCurrent.next = current.next;
            newCurrent = newCurrent.next;
            current.next = current.next.next;
            current = current.next;
        }

        return dummy.next;
    }
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