public static <T extends Comparable<T>> void insertionSort(List<T>list) {
		if (!(list instanceof RandomAccess)) list=new ArrayList<>(list);
		for (int i=1,n=list.size();i<n;++i) 
			for (int j=i;j>=1;--j) 
				if(list.get(j-1).compareTo(list.get(j))>0)Collections.swap(list,j-1,j);
				else break;
	}