A grammar question about c++
<pre><code>BinaryTree* sortedListToBST(ListNode *&amp; list, int start, int end) {
  if (start &gt; end) return NULL;
  // same as (start+end)/2, avoids overflow
  int mid = start + (end - start) / 2;
  BinaryTree *leftChild = sortedListToBST(list, start, mid-1);
  BinaryTree *parent = new BinaryTree(list-&gt;data);
  parent-&gt;left = leftChild;
  list = list-&gt;next;
  parent-&gt;right = sortedListToBST(list, mid+1, end);
  return parent;
}

BinaryTree* sortedListToBST(ListNode *head, int n) {
  return sortedListToBST(head, 0, n-1);
}
</code></pre>

<p>This is a function transferring sorted list to BST..
I don't understand in 1st line. Why "<code>ListNode *&amp;</code>"... if just "<code>ListNode*</code>" why wrong?
thank you for any explanation. </p>

<p>Thanks. One more question.. if just "ListNode &amp;list" it must be wrong, why we need "*" also,.. amateur of C++ forgive me my stupid question</p>
