题目一:Valid Sudoku
Determine if a Sudoku is valid, according to: Sudoku Puzzles - The Rules.
The Sudoku board could be partially filled, where empty cells are filled with the character '.'.
...
分类:
其他好文 时间:
2014-08-12 17:21:54
阅读次数:
250
错误信息:sudo: /etc/sudoers is world writablesudo: no valid sudoers sources found, quitting解决办法:修复磁盘权限就可以了
分类:
其他好文 时间:
2014-08-12 16:58:44
阅读次数:
689
第一次编译是好好的,需要手工输入keystore文件地址和密码等等。第二次不需要输入,然后就直接出错了。 找了一下,发现第一步之后,cocos会记录ant信息到\frameworks\runtime-src\proj.android\ant.properties 打开这个文件发现: key.stor...
分类:
Web程序 时间:
2014-08-12 16:57:24
阅读次数:
246
class Solution {public: int longestValidParentheses(string s) { vector stack; int maxlen = 0; int curlen = 0; int last ...
分类:
其他好文 时间:
2014-08-12 12:54:04
阅读次数:
169
Given a string s and a dictionary of words dict, add spaces in s to construct a sentence where each word is a valid dictionary word.Return all such po...
分类:
其他好文 时间:
2014-08-12 00:27:33
阅读次数:
264
这道题是个细节实现题,只要把valid sudoku满足的三个条件判断一下即可。valid sudoku需满足下列三个条件:1)每一行数字1~9有且只出现一次。2)每一列数字1~9有且只出现一次。3)对于每个3*3的sub-box(用i=3、6,j=3、6两条线划分,总共9个sub-box)数字1~...
分类:
其他好文 时间:
2014-08-10 23:57:10
阅读次数:
431
Given a string containing just the characters'(',')','{','}','['and']', determine if the input string is valid.The brackets must close in the correct ...
分类:
其他好文 时间:
2014-08-10 15:23:20
阅读次数:
215
这道题真心是难度比较大,不是算法难度,是实现难度,各种case都得考虑到。我没有A过,一开始就把.1这种case当做是错误的。导致程序逻辑乱套了。下面是别人的代码: 1 class Solution { 2 public: 3 bool isNumber(const char *s) { 4...
分类:
其他好文 时间:
2014-08-09 21:21:59
阅读次数:
347
Valid SudokuDetermine if a Sudoku is valid, according to:Sudoku Puzzles - The Rules.The Sudoku board could be partially filled, where empty cells are ...
分类:
其他好文 时间:
2014-08-09 21:20:39
阅读次数:
226
Evaluate the value of an arithmetic expression in Reverse Polish Notation.Valid operators are +, -, *, /. Each operand may be an integer or another ex...
分类:
其他好文 时间:
2014-08-08 23:49:56
阅读次数:
314