public static <T extends Comparable<T>> T[] selectAlgorithm(T[] t) {
if (t == null || t.length <=0) {
return null;
}
T tempMinNum = t[0];
for (int i = 0; i < t.length; i++) {
tempMinNum = t[i];
for (int j = i+1; j < t.length; j++) {
if (t[i].compareTo(t[j]) > 0) {
t[i] = t[j];
t[j] = tempMinNum;
tempMinNum = t[i];
}
}
}
return t;
}