摘要:
题目:在一个二维数组中,每一行都按照从左到右递增的顺序排序,每一列都按照从上到下递增的顺序排序。请完成一个函数,输入这样的一个二维数组和一个整数,判断数组中是否含有该整数。思路:鉴于数组的规律性,选取数组查找范围的右上角数字,如果与查找的数字相等, 则返回true;如果比查找的数字大,则将该数字所在... 阅读全文
posted @ 2015-05-07 22:09
AndyJee
阅读(364)
评论(0)
推荐(0)
摘要:
Write an efficient algorithm that searches for a value in an m x n matrix. This matrix has the following properties:Integers in each row are sorted fr... 阅读全文
posted @ 2015-05-07 21:56
AndyJee
阅读(1060)
评论(0)
推荐(0)
摘要:
题目:如下为类型CMyString的声明,请为该类型添加赋值运算符函数。class CMyString{public: CMyString(char* pData=NULL); CMyString(const CMyString& str); CMyString& operator=(const C... 阅读全文
posted @ 2015-05-07 21:05
AndyJee
阅读(925)
评论(0)
推荐(1)

浙公网安备 33010602011771号