title: Bubble sorting doesnt work from the first time in the linked list
body: <p>I'm trying to do bubble sorting for my linked list, it doesn't work from the first time, but if I call the function twice it sorts well, for example if the list is: 9 8 7 6 5 4 3 2 1, The sorting returns 4 3 2 1 5 6 7 8 9! What's the mistake here?</p>
  
  <pre><code>void sort() {
  
  if(Head == NULL)
      cout &lt;&lt; "Sorry but your list is empty! \n";
  else {
  
      int i,j,temp,k = count();
      node *current,*nextNode;
  
      for(i=0; i&lt;k-1; i++,k--) {
          current = Head;
          nextNode = current-&gt;Next;
  
          for(j = 1; j&lt;k; j++) {
              if(current-&gt;item &gt; nextNode-&gt;item){
                  temp = current-&gt;item;
                  current-&gt;item = nextNode-&gt;item;
                  nextNode-&gt;item = temp;
              }
              current = current-&gt;Next;
              nextNode = nextNode-&gt;Next;
          }
      }
      cout &lt;&lt; "Sorting Succeeded!\n";
  }
  }
  </code></pre>