题意: 有一个矩阵,每行有序,每列也有序。判断一个数target是否存在于此矩阵中。思路: 从右上角开始,如果当前数字target,该列作废。这样下去要么找到,要么到达边界退出。 1 class Solution { 2 public: 3 bool searchMatrix(vecto...
分类:
其他好文 时间:
2015-11-04 22:49:47
阅读次数:
300
题意: 从1开始产生连续的n2个数字,以螺旋的方式填满一个n*n的数组。思路: 由于是填满一个矩阵,那么只需要每次都填一圈即可。应该注意特殊情况。 迭代: 1 class Solution { 2 public: 3 vector > generateMatrix(int n) 4...
分类:
其他好文 时间:
2015-11-04 21:06:57
阅读次数:
216
function?[L,U,p]?=?lutxloops(A)
%LU?Triangular?factorization
%???[L,U,p]?=?lup(A)?produces?a?unit?lower?triangular?matrix?L,
%???an?upper?triangular?matrix?U?and?a?permu...
分类:
其他好文 时间:
2015-11-04 16:10:25
阅读次数:
300
1.冒泡排序算法,增加flag标记/** * Created by xingxing.duan on 2015/11/4. */public class BubbleSort { private static void bubbleSort(int[] matrix) { boo...
分类:
编程语言 时间:
2015-11-04 12:56:03
阅读次数:
168
Android中实现Bitmap在自定义View中的放大与拖动一:基本实现思路基于View类实现自定义View–MyImageView类。在使用View的Activity类中完成OnTouchListener接口,实现对自定义View的触摸事件监听放大与拖动基于单点触控实现Bitmap对象在View上的拖动、并且检测View的边缘,防?.
分类:
移动开发 时间:
2015-11-04 07:07:19
阅读次数:
312
/** * Created by icecookstar on 2015/11/3. * 归并排序 */public class MergeSort { private static void merge(int[] matrix, int first, int middle, int las...
分类:
编程语言 时间:
2015-11-04 00:30:31
阅读次数:
259
/** * Created by icecookstar on 2015/11/3. */public class BinarySearch { private static int binarySearch(int[] matrix, int i, int j, int find) { ...
分类:
其他好文 时间:
2015-11-04 00:25:56
阅读次数:
148
1、题目名称 Spiral Matrix(螺旋输出矩阵中的元素) 2、题目地址 https://leetcode.com/problems/spiral-matrix-ii/ 3、题目内容 英文:Given an integer n, generate a square matrix filled with elements fro...
分类:
其他好文 时间:
2015-11-03 23:13:34
阅读次数:
339
BIP Deskotop 11.119.00.0 (32-bit)Office 2013 (32-bit)Win 7 (64-bit)The current certification matrix seems to say this is supported, however I am havin...
题目描述:(链接)Write an efficient algorithm that searches for a value in anmxnmatrix. This matrix has the following properties:Integers in each row are sort...
分类:
其他好文 时间:
2015-11-03 00:27:30
阅读次数:
171