LintCode 161-旋转图像
来源:互联网 发布:php 数组长度函数 编辑:程序博客网 时间:2024/05/29 07:07
本人电子系,只为一学生。心喜计算机,小编以怡情。
static public void rotate(int[][] matrix) { // write your code here if(matrix.length==0) return ; int [][]temp=new int[matrix.length][matrix[0].length]; for (int i = 0, m=matrix[0].length-1; i < matrix.length&& m>=0; i++,m--) for (int j = 0,n=0; j < matrix[0].length&&n<matrix.length; j++,n++) { temp[n][m]=matrix[i][j]; //matrix = temp for (int i = 0; i < temp.length; i++) { for (int j = 0; j < temp[0].length; j++) { matrix[i][j]=temp[i][j]; } } }
阅读全文
0 0
- lintcode-旋转图像-161
- LintCode 161-旋转图像
- LintCode-旋转图像
- LintCode:旋转图像
- LintCode:旋转图像
- 旋转图像-LintCode
- [LintCode] 旋转图像 Rotate Image
- LintCode-旋转链表
- LintCode-旋转链表
- LintCode:旋转链表
- LintCode:旋转字符串
- lintcode ----旋转字符串
- Lintcode 恢复旋转数组
- LintCode 8 旋转字符串
- LintCode : 旋转链表
- Lintcode 旋转字符串
- LintCode 旋转字符串
- lintcode--旋转字符串
- springmvc Required request body content is missing异常
- 十三个大数据学习网站
- 手把手教你使用 RxJava 2.0(三)
- 强大的分页工具----layPage
- 简单博弈 之江学院 F qwb has a lot of Coins
- LintCode 161-旋转图像
- lubuntu14.04右下角没有网络管理的解决方法
- Hibernate中Criteria的完整用法
- list动态remove处理并发异常ConcurrentModificationException 问题
- UIWebView网页视图
- Linux I/O 调度
- fastjson 属性大写问题
- 面--经集合1
- 最简单的Android项目(NDK命令行编译)