title: BubbleSort on Custom LinkedList
body: <p>I am trying to sort the 'Data'. The Data is suppose to be sorted by numbers. I am trying to implement BubbleSort(), but unable to process the same.</p>
  
  <pre><code>    public void bubbleSort() {       
      if (isEmpty())
      {
          System.out.println("The Empty List Is Already Sorted");
      }
      else if (first.next == null) {
          System.out.println("One Element List Is Already Sorted");
      }
      else {
          Node current = first;
          boolean swapDone = true;
          while (swapDone) {
  
              swapDone = false;
  
              while (current != null) { 
  
                  if (current.next != null &amp;&amp; current.value.getScore() &gt;                     current.next.value.getScore()) {
  
                      Data temp = current.value;
                      current.value.setScore(current.next.value.getScore());
                      current.value.setName(current.next.value.getName());
                      current.next.value.setScore(temp.getScore());  
                      current.next.value.setName(temp.getName());                        
                  }
                  current = current.next;
              }
              current = first;
          }
      }
  </code></pre>