title: Copy a linked list
body: <pre><code>typedef struct Node
  {
    int data;
    Node *next;
    Node *other;
  };
  
  Node *pHead;
  </code></pre>
  
  <p><code>pHead</code> is a singly linked list. The <code>next</code> field points to the next element in the list. The <code>other</code> field may point to any other element (could be one of the previous nodes or one of the nodes ahead) in the list or <code>NULL</code>.</p>
  
  <p>How does one write a copy function that duplicates the linked list and its connectivity? None of the elements (<code>next</code> and <code>other</code>) in the new list should point to any element in the old list.</p>