package Sorting; import java.util.*; public class InsertionSort { public static void main(String[] args) { Scanner sc = new Scanner(System.in); System.out.print("Enter the Size of the Array: "); int size = sc.nextInt(); int array[] = new int[size]; //for input System.out.print("Enter the array element: "); for(int i=0; i= 0 && array[j] > current) { //Keep swapping array[j+1] = array[j]; j--; } array[j+1] = current; } for(int i=0; i