title: selection sort on singly linked list
body: <p>my algorithm works...almost...for some reason the last two elements are in the wrong order after sorting. Also, the print statement does not show me that <code>first</code> moves to the right.</p>
  
  <pre><code>public static SLL sort(SLL list)
  {
      SLLNode first = list.first ;
      SLLNode second ;
  
      while (first!=null)
      {
          System.out.println(first.data); // for seeing if first does move to the right
          second = first.succ ;
          while (second!=null)
          {
              if (second.data.compareTo(first.data)&lt;0)
              {
                  String temp = first.data ;
                  first.data = second.data ;
                  second.data = temp ;
              }
              second = second.succ ;
          }
          first = first.succ ;
      }
      return list ;
  }
  </code></pre>
  
  <p>before sorting:  <code>FFF fff Hi AAA Bye Ciao</code></p>
  
  <p>after sorting:   <code>AAA Bye Ciao FFF Hi fff</code></p>
  
  <p>my print statement outputs <code>FFF</code> at first, then only <code>fff</code>'s</p>