Valid PalindromeGiven a string, determine if it
is a palindrome, considering only alphanumeric characters and ignoring cases.For
example,"A man, a pla...
分类:
其他好文 时间:
2014-05-12 16:27:07
阅读次数:
332
最近xcode升级了5.1版本,升级之后程序报关于要适配arm64机器的错。之前对xcode的参数配置,一直不是很了解,但实现先面对问题了,就调查了一下并解决它。一个一个来吧。Architectures这代表,在这个项目里你想要Xcode编译的目标设备列表。Valid
Architectures还不...
分类:
其他好文 时间:
2014-05-09 17:29:01
阅读次数:
237
14. which three are valid declaraction of a float?
ADFA. float foo=-1; B. float foo=1.0; C. float foo=42e1; D. float foo=2.02f; E.
float foo=3.03d; F....
分类:
其他好文 时间:
2014-05-09 16:37:31
阅读次数:
323
方法一:DFS递归,判断每一个是否为回文数1,首先要有一个判断字符串是否是回文的函数。容易实现,字符串从两边同时往中间走,看字符是否相同;2,深度优先搜索思想对字符串进行遍历。得到结果。例如,s
= "abacd"; 需要对“a”“ad”“aba”“abac”“abacd”进行深度优先搜索。深度搜索...
分类:
其他好文 时间:
2014-05-06 00:52:34
阅读次数:
388
当引用了其他工程时,在编译时报错,提示你编译指令架构不对,你需要查看一下这几个工程的Architecture部分是否又冲突,比如主工程设置Valid
Architecture为armv7 而 另一个子工程却设置了build active architecture only 为yes,这时如果你插入了...
分类:
移动开发 时间:
2014-05-04 20:51:04
阅读次数:
2166
题目
Evaluate the value of an arithmetic expression in Reverse Polish Notation.
Valid operators are +, -, *, /.
Each operand may be an integer or another expression.
Some examples:
["2...
分类:
其他好文 时间:
2014-05-04 18:34:44
阅读次数:
272
给定一个数,求一个新数要大于等于这个数,而这个新数既要是palindromes回文又要是prime素数。
题目很简单,有人都使用取巧的方法保存好结果直接查表。
或者暴力法求解。
这里不使用保存表的方法,也不要用暴力法。- 这些方法都不好。
使用的技巧有:
1 而是使用next palindrome的技巧,只需要O(n),n是数位,可以认为是常数了。
2 判断素数的方法,时间效率是O(s...
分类:
其他好文 时间:
2014-05-04 09:18:17
阅读次数:
334
题意:给出一串字符串,求出需要至少插入多少个字符使得这个字符串变成会问粗...
分类:
其他好文 时间:
2014-05-02 23:26:33
阅读次数:
486
Given a binary tree, determine if it is a valid
binary search tree (BST).Assume a BST is defined as follows:The left subtree of
a node contains only n...
分类:
其他好文 时间:
2014-05-02 15:03:57
阅读次数:
386
A regular palindrome is a string of numbers or letters that is the same forward as backward. For example, the string "ABCDEDCBA" is a palindrome because it is the same when the string is read from lef...
分类:
其他好文 时间:
2014-05-02 10:33:09
阅读次数:
332