import java.util.*;
public class Sort {
private Sort() {
}
public static void output(List data) {
for(int i = 0, n = data.size(); i < n; i++)
System.out.print(data.get(i) + ", ");
System.out.println();
}
public static void insert(List data) {
for(int i = 0, n = data.size(); i < n; i++ ) {
int j = i;
while(j > 0 && data.get(i) < data.get(j - 1))
j--;
int tmp = data.get(i);
for(int k = i; k > j; k--)
data.set(k, data.get(k - 1));
data.set(j, tmp);
output(data);
}
import java.util.*;
public class Sort {
private Sort() {
}
public static void output(List data) {
for(int i = 0, n = data.size(); i < n; i++)
System.out.print(data.get(i) + ", ");
System.out.println();
}
public static void insert(List data) {
for(int i = 0, n = data.size(); i < n; i++ ) {
int j = i;
while(j > 0 && data.get(i) < data.get(j - 1))
j--;
int tmp = data.get(i);
for(int k = i; k > j; k--)
data.set(k, data.get(k - 1));
data.set(j, tmp);
output(data);
}