5月4日,ArrayTranspose,每日20行。
来源:互联网 发布:网络吸引中学生的原因 编辑:程序博客网 时间:2024/06/01 09:45
public class ArrayTranspose { public static void transpose(int[][] m){ if(m == null) return; int temp; for(int i = 0; i < m.length; i++){ for(int j = 0; j < m.length; j++){ if(i > j){ temp = m[i][j]; m[i][j] = m[j][i]; m[j][i] = temp; } } } } public static void print(int[][] m){ if(m == null) return; for(int i = 0; i < m.length; i++){ for(int j = 0; j < m.length; j++){ System.out.print(m[i][j] + " "); } System.out.println(""); } } public static void main(String[] args) { int[][] t = {{1, 2, 3}, {4, 5, 6}, {7, 8, 9}}; print(t); transpose(t); System.out.println("转置后的矩阵为:"); print(t); }}
0 0
- 5月4日,ArrayTranspose,每日20行。
- 5月7日,每日20行。
- 5月25日,每日20行。
- 5月26日,每日20行。
- 5月27日,每日20行。
- 5月28日,每日20行。
- 5月29日,每日20行。
- 5月30日,每日20行。
- 5月31日,每日20行。
- 6月5日,每日20行。
- 6月4日,每日20行。
- 4月5日,StringBufferPass,每日20行。
- 4月20日,TestVector,每日20行。
- 5月5日,RunPC,每日20行。
- 4月4日,Decode,每日20行。
- 3月5日,TestFrame,每日20行。
- 5月1日,RunIntClass,每日20行。
- 5月2日,RunIntClass,每日20行。
- 范式
- RMI 相关知识
- 安装RegCM的时候提示netCDF module not found解决办法
- 字符数组循环右移:1道面试题的流水解法
- 贪吃蛇系列终章----贪吃蛇专家智能bug修复版
- 5月4日,ArrayTranspose,每日20行。
- 带你分析字节码-深入理解class(二)
- (一)U-Boot启动过程--详细版的完全分析
- 《Android群英传》笔记1——Android系统架构
- 在代码中使用stroyboard中的ViewController
- 使用MySQL数据库
- 文件基本操作(matlab)
- 5.4
- perl文件句柄的理解(tell、seek)以及文本多行匹配的一种算法