Microsoft interview question

Copy list with next and random pointers without using more memory than needed for a copy