题目‘?’ Matches any single character.
‘*’ Matches any sequence of characters (including the empty sequence).The matching should cover the entire input string (not partial).The function prototype should...
分类:
编程语言 时间:
2015-03-21 12:43:07
阅读次数:
190
Use two stacks :class MinStack {private: stack s, minS;public: void push(int x) { if (minS.empty() || x s;public: void push(int x) { ...
分类:
其他好文 时间:
2015-03-21 08:34:04
阅读次数:
124
今天碰到一个很奇葩的问题, 调试了半天:
错误:“index 0 beyond bounds for empty array”, 意思就是说数据源数组为nil, 所以你调用直接取值自然就报错.
我叙述下我的场景:
1. 在UITaleView中创建cell, 数据源dataArray是存在并且数量为10, 然后我是[dataArray objectAtIndexindexPa...
分类:
编程语言 时间:
2015-03-20 18:48:11
阅读次数:
145
屏蔽IE浏览器(也就是IE下不显示)*:lang(zh)select{font:12px !important;} /*FF,OP可见,特别提醒:由于Opera最近的升级,目前此句只为FF所识别*/select:empty {font:12px !important;} /*safari可见*/这里...
分类:
Web程序 时间:
2015-03-20 17:43:01
阅读次数:
112
Given a string s consists of upper/lower-case alphabets and empty space characters ' ', return the length of last word in the string.If the last word ...
分类:
其他好文 时间:
2015-03-20 16:16:40
阅读次数:
124
Follow up for "Unique Paths":Now consider if some obstacles are added to the grids. How many unique paths would there be?An obstacle and empty space i...
分类:
其他好文 时间:
2015-03-20 15:58:44
阅读次数:
116
1. Use memory :In the question, it already stated that there must be a majority element. So discard empty situation.Also it needs the number, not the ...
分类:
其他好文 时间:
2015-03-20 09:11:55
阅读次数:
143
This is just a combination. Use hashtable to hold the number ==> charsnotes:1. check corner case : input is empty, do not return vector contains empty...
分类:
其他好文 时间:
2015-03-20 08:03:21
阅读次数:
127
Tried it with spliting words method. But need to check empty situation. 1 class Solution { 2 public: 3 int lengthOfLastWord(const char *s) { 4 ...
分类:
其他好文 时间:
2015-03-20 08:03:07
阅读次数:
129
Notes:1. Even s3 is empty string, if s1 and s2 are emtpy, then it should be true.2. Do not mess up the size of label. 1 class Solution { 2 public: 3 ....
分类:
其他好文 时间:
2015-03-20 06:54:54
阅读次数:
115