题目:
You are given an n x n 2D matrix representing an image.
Rotate the image by 90 degrees (clockwise).
Follow up:
Could you do this in-place?
不使用额外的存储空间,完成N*N的图片的90度旋转(顺时针)
Answer 1: ...
分类:
编程语言 时间:
2015-01-05 16:47:49
阅读次数:
222
public class MainActivity extends Activity implements OnClickListener { private ImageView iv; private Bitmap bitmapR04; private Boolean change = false...
分类:
其他好文 时间:
2015-01-05 01:45:23
阅读次数:
177
Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sorted from l...
分类:
其他好文 时间:
2015-01-04 22:48:33
阅读次数:
222
NGUI3.6版本第一种方案:1. NGUI Options Handles -> turn off 拖动打开第二种方案:1. 勾选上Edit –> Project Setting –> Physics –>Layer Collision Matrix勾选上UI
分类:
其他好文 时间:
2015-01-04 21:16:08
阅读次数:
216
CSS3动画相关的属性:transform,transition,animation.变形Transform语法:transform: rotate | scale | skew | translate |matrix;rotate:旋转,通过指定一个角度对原元素进行2D旋转,正值表示顺时针旋转,负...
分类:
Web程序 时间:
2015-01-04 21:14:57
阅读次数:
216
https://oj.leetcode.com/problems/set-matrix-zeroes/http://blog.csdn.net/linhuanmars/article/details/24066199publicclassSolution{
publicvoidsetZeroes(int[][]matrix)
{
//SolutionA:
//setZeroes_NoExtraSpace(matrix);
//SolutionB:
setZeroes_ExtraRowAndCol(matri..
分类:
其他好文 时间:
2015-01-04 19:40:25
阅读次数:
194
https://oj.leetcode.com/problems/search-a-2d-matrix/http://blog.csdn.net/linhuanmars/article/details/24216235publicclassSolution{
publicbooleansearchMatrix(int[][]matrix,inttarget){
//Searchfromrightcorner
intn=matrix.length;//howmanyrows.
intm=matrix[0].le..
分类:
其他好文 时间:
2015-01-04 19:37:46
阅读次数:
131
https://oj.leetcode.com/problems/rotate-p_w_picpath/http://blog.csdn.net/linhuanmars/article/details/21503683publicclassSolution{
//Assumeitisan*n.
publicvoidrotate(int[][]matrix)
{
//SolutionA:
//rotate_ExtraMatrix(matrix);
//SolutionB:
rotate_TwoRotate(..
分类:
其他好文 时间:
2015-01-03 13:23:23
阅读次数:
309
Search a 2D MatrixWrite an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row...
分类:
其他好文 时间:
2015-01-01 00:09:35
阅读次数:
132