Algorithm/Steps to sort a list or array of "N" numbers in ascending order:
public class SortNumbersAscendingOrder {
public static void main(String[] args) {
int numbers[] = { 56,4,7,8,34,78,12,57,78,98,94,89999,1,56,8};
int temp=0;
int length = numbers.length;
for(int i=0; i<length-1; i++) {
for(int j=0; j<length-1; j++) {
if(numbers[j]>numbers[j+1]) {
temp = numbers[j];
numbers[j] = numbers[j+1];
numbers[j+1] = temp;
}
}
}
for(int i=0; i<numbers.length; i++) {
System.out.print("" + numbers[i] );
if(i<numbers.length-1) {
System.out.print("," );
}
}
}
}