(head)
return dic.get(head)
:type head: RandomListNode
    :rtype: RandomListNode
:type head: RandomListNode
    :rtype: RandomListNode
: type head : RandomListNode : rtype : RandomListNode
def copy_random_pointer_v1(head):
    """
    :type head: RandomListNode
    :rtype: RandomListNode
    """
    dic = dict()
    m = n = head
    while m:
        dic[m] = RandomListNode(m.label)
        m = m.next
    while n:
        dic[n].next = dic.get(n.next)
        dic[n].random = dic.get(n.random)
        n = n.next
    return dic.get(head)
def copy_random_pointer_v1 ( head ) : dic = dict ( ) m = n = head while m : dic [ m ] = RandomListNode ( m . label ) m = m . next while n : dic [ n ] . next = dic . get ( n . next ) dic [ n ] . random = dic . get ( n . random ) n = n . next return dic . get ( head )