Program n20
Program n20
Program n20
import java.util.Scanner;
int m = array.length;
for (int j = 0; j < n; j++) {//sort the array column major wise
int k =i-1;
k--;
}
System.out.println();
int m = scanner.nextInt();
int n = scanner.nextInt();
array[i][j] = scanner.nextInt();
System.out.println("Original array:");
printArray(array);
insertionSortColumnWise(array);
System.out.println("Sorted array:");
printArray(array);
}
Output: