<commit_before>import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;

public class Solution {

    // Complete the insertionSort1 function below.
    
    static void print(int[] arr){
        for(int i=0;i<arr.length;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.println(" ");
    }
    
    static void insertionSort1(int n, int[] arr) {
        int k=0;
        int a=0;
        for(int i=n-2;i>=0;i--){
            a = arr[i];
            for(int j=i-1;j>=0;j--){
                if(arr[j]<a){
                    k = j;
                    //break;
                    for(int b=i-1; b>k;b--){
                        //int t=arr[b+1];
                        arr[b+1]=arr[b];
                        //arr[b+2]=t;
                    }
                    print(arr);
                    break;
                }
            }
            //arr[k]=arr[i];
            
            arr[k]=a;
        }
        
        print(arr);
    }

    private static final Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt();
        scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");

        int[] arr = new int[n];

        String[] arrItems = scanner.nextLine().split(" ");
        scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");

        for (int i = 0; i < n; i++) {
            int arrItem = Integer.parseInt(arrItems[i]);
            arr[i] = arrItem;
        }

        insertionSort1(n, arr);

        scanner.close();
    }
}<commit_msg>add InsertionSort1.java<commit_after>import java.io.*;
import java.math.*;
import java.security.*;
import java.text.*;
import java.util.*;
import java.util.concurrent.*;
import java.util.regex.*;

public class Solution {

    // Complete the insertionSort1 function below.
    
    static void print(int[] arr){
        for(int i=0;i<arr.length;i++){
            System.out.print(arr[i]+" ");
        }
        System.out.println(" ");
    }
    
    static void insertionSort1(int n, int[] arr) {
        int key= arr[n-1];
        for(int i=n-2;i>=-1;i--){
            if(i==-1){
                arr[0]=key;
                print(arr);
                break;
            }
            if(arr[i]>key){
                arr[i+1]=arr[i];
                print(arr);
            }
            else{
                arr[i+1]=key;
                print(arr);
                break;
            }
        }
    }

    private static final Scanner scanner = new Scanner(System.in);

    public static void main(String[] args) {
        int n = scanner.nextInt();
        scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");

        int[] arr = new int[n];

        String[] arrItems = scanner.nextLine().split(" ");
        scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?");

        for (int i = 0; i < n; i++) {
            int arrItem = Integer.parseInt(arrItems[i]);
            arr[i] = arrItem;
        }

        insertionSort1(n, arr);

        scanner.close();
    }
}
{'fraction_non_alphanumeric': 0.16586461341033046, 'fraction_numerical': 0.02438241899262111, 'mean_word_length': 1.4021571648690292, 'pattern_counts': {'":': 0, '<': 8, '<?xml version=': 0, '>': 8, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '3513606', 'n_tokens_mistral': 1069, 'n_tokens_neox': 997, 'n_words': 193}