有一个二维数组(n*n),写程序实现从 右上角 到 左下角 沿主对角线方向打印. 测试样例:
[[1,2,3,4], [5,6,7,8], [9,10,11,12], [13,14,15,16]], 4
返回:[4,3,8,2,7,12,1,6,11,16,5,10,15,9,14,13]
public class DemoA {
public int[] arrayPrint(int[
有一个二维数组(n*n),写程序实现从 右上角 到 左下角 沿主对角线方向打印. 测试样例:
[[1,2,3,4], [5,6,7,8], [9,10,11,12], [13,14,15,16]], 4
返回:[4,3,8,2,7,12,1,6,11,16,5,10,15,9,14,13]
public class DemoA {
public int[] arrayPrint(int[