题目:
Regular Expression Matching
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire input string (not partial).
The...
分类:
其他好文 时间:
2015-06-10 09:02:26
阅读次数:
114
1、Tomcat Server的组成部分1.1 - ServerA Server element represents the entire Catalina servlet container. (Singleton)1.2 - ServiceA Service element represent...
分类:
Web程序 时间:
2015-06-03 11:20:55
阅读次数:
131
Implement regular expression matching with support for '.' and
'*'.
'.' Matches any single character.
'*' Matches zero or more of the preceding element.
The matching should cover the entire inpu...
分类:
其他好文 时间:
2015-06-02 00:32:05
阅读次数:
121
Set Matrix Zeroes
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.
因为没有额外的空间,我们可以采用第一个0元素所在的行和列来保存0元素的信息。void setZeroes(vector<vector>& matrix) {...
分类:
编程语言 时间:
2015-05-25 13:08:36
阅读次数:
155
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.解题思路:用两个boolean数组row col表示行列是否有零即可,JAVA实现如下: public void ...
分类:
编程语言 时间:
2015-05-17 10:38:44
阅读次数:
179
Given amxnmatrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space?A s...
分类:
其他好文 时间:
2015-05-14 23:19:26
阅读次数:
148
The Ph.D. GrindA Ph.D. Student MemoirSummaryThe Ph.D. Grind, a122-page e-book, is the first known detailed account of an entire Ph.D. experience.So fa...
分类:
其他好文 时间:
2015-05-14 20:25:13
阅读次数:
168
Here's How: To capture the entire desktop, press Command-Shift-3. The screen shot will be automatically saved as a PNG file on your desktop. To copy t...
分类:
系统相关 时间:
2015-05-10 08:34:11
阅读次数:
162
Given a m x n matrix, if an element is 0, set its entire row and column to 0. Do it in place.click to show follow up.Follow up:Did you use extra space...
分类:
其他好文 时间:
2015-05-04 13:45:22
阅读次数:
120
Given a m x n matrix,
if an element is 0, set its entire row and column to 0. Do it in place.
遍历矩阵,如果遇到等于0的元素,则把该元素所在行的第一个元素和所在列第一个元素置为0。考虑到row0和col0会重合,所以另外设置一个变量col0来表示第一列的情况。
然后从左下角开始,把符合条件的元素置...
分类:
其他好文 时间:
2015-04-23 13:17:37
阅读次数:
104