package TT;

public class Test206 {
 
	public static void InsertSrot(int[] arr){
		
		int i,j;
		int target;
		
		for(i=1;i<arr.length;i++){
			j=i;
			target=arr[i];
			
			while(j>0 && target<arr[j-1]){
				arr[j]=arr[j-1];
				j--;
			}
			arr[j]=target;
		}	
	}
	public static void main(String[] args){
		  
		  int[] arr = {13,21,3,2,5,6,1,11,4,9};
		  InsertSrot(arr);
		  for(int num:arr){
			  System.out.println(num+" ");
		  }
	}
 
}