title: Difference in using * in Linked List in C++
body: <p>What is the difference between <code>(*current = *current-&gt;next)</code>and <code>(current = current-&gt;next)</code>?
  My code is:</p>
  
  <pre><code>class Solution {
  public:
      ListNode* deleteDuplicates(ListNode* head) {
  
          ListNode* current = head;
          while(current!=NULL)
          {
              while (current-&gt;next!=NULL &amp;&amp; current-&gt;val==current-&gt;next-&gt;val)
                  *current = *current-&gt;next;
              current = current-&gt;next;
          }
          return head;
      }
  };
  </code></pre>