please help me complete the sort method in java

Suppose you have a linked list class that stores integers. The integers can be both negative and positive. Based on the following class definition, give the pseudocode or the Java code for the sort() method, which sorts the list.

public class SortedIntegerList { protected static class Node {

Node next; int value;

}

private Node head;

public SortedIntegerList() { } public void append(int value) {

Node n = new Node(); n.value = value;

if (head == null) { head = n;

} else {

Node tmp = head;

while (tmp.next != null) { tmp = tmp.next;

}

tmp.next = n;

}

}

public void sort() {

// WRITE YOUR CODE HERE

}

}

 
Do you need a similar assignment done for you from scratch? We have qualified writers to help you. We assure you an A+ quality paper that is free from plagiarism. Order now for an Amazing Discount!
Use Discount Code "Newclient" for a 15% Discount!

NB: We do not resell papers. Upon ordering, we do an original paper exclusively for you.