A 2D array of integers and a function that iteratively sorts based on the column number and prints the sorted array
Below is an example of the output of sorting the arrays by the 1st column.
[0, 0, 29, 3, 4, 26, 10]
[0, 26, 14, 22, 15, 15, 19]
[0, 18, 21, 4, 4, 24, 16]
[0, 24, 16, 24, 7, 2, 25]
[3, 24, 24, 25, 6, 17, 16]
[4, 10, 4, 17, 10, 16, 21]
[4, 29, 20, 23, 18, 4, 25]
[4, 29, 5, 7, 28, 0, 19]
[5, 7, 10, 17, 3, 21, 16]
[5, 1, 20, 21, 15, 28, 16]
[5, 11, 0, 4, 14, 7, 27]
[5, 24, 0, 13, 15, 9, 5]
[7, 1, 18, 1, 23, 17, 24]
[10, 29, 27, 13, 10, 28, 26]
[11, 6, 19, 5, 8, 14, 15]
[12, 11, 6, 8, 0, 1, 21]
[14, 0, 5, 17, 23, 14, 3]
[14, 4, 24, 2, 3, 11, 25]
[16, 3, 0, 22, 23, 22, 15]
[19, 9, 29, 6, 6, 5, 21]
[19, 29, 17, 7, 16, 13, 19]
[20, 10, 21, 13, 13, 23, 10]
[21, 20, 12, 3, 8, 14, 7]
[22, 15, 13, 2, 25, 6, 5]
[22, 18, 9, 17, 14, 27, 18]
[26, 16, 27, 8, 6, 13, 21]
[26, 17, 27, 2, 9, 16, 7]
[27, 20, 26, 11, 7, 25, 3]
[28, 4, 21, 12, 1, 26, 22]
[29, 7, 20, 14, 10, 7, 22]