Mobileye Interview Question

given a linked list, where each node contains: value, next and pointer to a random node in the list, write a function which returns a copy of the list.