title: Swapping Nodes on a single linked list
body: <p>Since long back I have not used C or C++ ,so forget completely about Pointers. I'm familiar with C# and have written a basic version of this. Need to know whether I'm doing right/wrong?</p>
  
  <p>Input:Linked List a->b->c->d->e->null</p>
  
  <p>Output: Linked List b->a->d->c->e->null</p>
  
  <p>We have to write code such that memory position is swapped and not the node value.</p>
  
  <pre><code>    public void SwapLinkedList(LinkedList&lt;int&gt; LL)
      {
          LinkedListNode&lt;int&gt; current = LL.First;
          while (current.Next != null)
          {
              int temp = current.Next.Value;
              current.Next.Value = current.Value;
              current.Value = temp;
              current = current.Next.Next;
          }
      }
  </code></pre>