循环有序 一共有以下两种情况 第一种 / / // / / 条件:(A[mid] >= A[low]) ,low~mid 二分,mid~high 递归第二种 / / / / / / 条件:(A[mid] A[mid])12 ...
分类:
其他好文 时间:
2014-06-19 06:46:36
阅读次数:
303
可以用宏表函数GET.DOCUMENT(),得到当前页(垂直方向分页):
1、定义两个名称:
(1)Page,引用位置:=IF(ISNA(MATCH(ROW(),GET.DOCUMENT(64))),1,MATCH(ROW(),GET.DOCUMENT(64))+1);
(2)TotalPage,引用位置:=GET.DOCUMENT(50);
2、在需要显示结果的单元格中输入公式:
="...
分类:
其他好文 时间:
2014-06-15 19:23:37
阅读次数:
208
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 from left to right.The first integer of each...
分类:
其他好文 时间:
2014-06-15 14:12:44
阅读次数:
238
【Control Flow】1、for loop中的元素可以省略: 2、for initializer中的变量只能在循环内使用。3、if、else if、else的用法: 最后一个else可选。4、switch用法: 5、range match: 6、tuple作为case: 7、va...
分类:
其他好文 时间:
2014-06-15 14:07:20
阅读次数:
283
题目:Unique Binary Search TreesGivenn, how many structurally uniqueBST's(binary search trees) that store values 1...n?For example,Givenn= 3, there are a...
分类:
其他好文 时间:
2014-06-15 13:16:53
阅读次数:
202
给一个二维字符数组,给一个字符串,问该二维数组是否包含该字符串。比如一个二维数组[ ABCE SFCS ADEE ]和字符串"ABCCED",这个就包含。解决这个问题,主要的关键是怎么解决在二维数组中查找方向,如何来标识哪些是走过的。
代码如下...
分类:
其他好文 时间:
2014-06-15 10:02:15
阅读次数:
221
概述:本文试图分析理解view 的measure 的过程,在分析过程中重点分析了LayoutParams 中MATCH_PARENT和MATCH_PARENT 的对应关系;onMeasure 默认值的计算过程;解释了onMeasure 接口中的注释中的问题,并提出一个问题:ViewRootImpl 是怎么创建的? 留作下篇引子。最后,讨论如何重写onMeasure()方法。
LayoutPara...
分类:
其他好文 时间:
2014-06-15 09:58:12
阅读次数:
440
http://ruby-doc.org/core-2.1.2/Regexp.htmlRegexpARegexpholds a regular expression, used to match a pattern against strings. Regexps are created using ...
分类:
其他好文 时间:
2014-06-14 21:17:33
阅读次数:
304
服务端:首先拿出一块分区/dev/sda5# yum search target# yum install scsi-target-utils.x86_64 -y //服务端的包# vim /etc/tgt/targets.conf //编辑服务端的配置//共享出这块分区的名字为redhat:...
分类:
系统相关 时间:
2014-06-14 21:04:16
阅读次数:
332
题目
Follow up for "Search in Rotated Sorted Array":
What if duplicates are allowed?
Would this affect the run-time complexity? How and why?
Write a function to determine if a given target is in the array.
原题链接(点我)
解题思路
这题和Search in Rotated Sorted Array问题类似,...
分类:
其他好文 时间:
2014-06-14 12:44:18
阅读次数:
266