LintCode:旋转图像
来源:互联网 发布:速干毛巾 知乎 编辑:程序博客网 时间:2024/05/18 02:41
LintCode:旋转图像
public class Solution { /** * @param matrix: A list of lists of integers * @return: Void */ public void rotate(int[][] matrix) { // write your code here int N = matrix.length; int[][] tmp = new int[N][N]; for(int i=0; i<N; i++){ for(int j=0; j<N; j++){ tmp[i][j] = matrix[N-1-j][i]; } } for(int i=0; i<N; i++){ for(int j=0; j<N; j++){ matrix[i][j] = tmp[i][j]; } } }}
0 0
- LintCode-旋转图像
- lintcode-旋转图像-161
- LintCode:旋转图像
- LintCode:旋转图像
- LintCode 161-旋转图像
- 旋转图像-LintCode
- [LintCode] 旋转图像 Rotate Image
- LintCode-旋转链表
- LintCode-旋转链表
- LintCode:旋转链表
- LintCode:旋转字符串
- lintcode ----旋转字符串
- Lintcode 恢复旋转数组
- LintCode 8 旋转字符串
- LintCode : 旋转链表
- Lintcode 旋转字符串
- LintCode 旋转字符串
- lintcode--旋转字符串
- Linux第三天
- 中缀表达式与前缀表达式的转换
- 1ARM的三级流水线
- Magic Powder - 2
- FZU 1911Construct a Matrix
- LintCode:旋转图像
- UVA165Stamps
- POJ2007 Scrambled Polygon
- HDU 2242 强联通分量+树形DP
- LeetCode题解-106-Construct Binary Tree from Inorder and Postorder Traversal
- Crossed Ladders(二分+几何)
- hdu5758Explorer Bo
- hdu 3729 I'm Telling the Truth(二分图最大匹配,字典序最大输出)
- 使用OnScrollListener回调处理自动加载更多