摘要: 20. Valid Parentheses Given a string containing just the characters '(', ')', '{', '}', '[' and ']', determine if the input string is valid. The brack 阅读全文
posted @ 2017-08-08 23:08 这个手杀不太0 阅读(183) 评论(0) 推荐(0)
摘要: 14. Longest Common Prefix Write a function to find the longest common prefix string amongst an array of strings. 寻找一个数组中最长的公共前缀 例如["baaa","caaabbb","a 阅读全文
posted @ 2017-08-08 21:35 这个手杀不太0 阅读(141) 评论(0) 推荐(0)
摘要: public String substring(int beginIndex, int endIndex) 第一个int为开始的索引,对应String数字中的开始位置, 第二个是截止的索引位置,对应String中的结束位置 1、取得的字符串长度为:endIndex - beginIndex; 2、从 阅读全文
posted @ 2017-08-08 21:00 这个手杀不太0 阅读(2904) 评论(0) 推荐(0)
摘要: <script type="text/javascript"> var str="Hello world!" document.write(str.charAt(1)) </script>获取某位字符串的字符(0-length-1) 阅读全文
posted @ 2017-08-08 20:20 这个手杀不太0 阅读(403) 评论(0) 推荐(0)
摘要: (单独把一个东西说清楚,然后再说清楚另一个,这样,它们的区别自然就出来了,混在一起说,则很难说清楚) ==操作符专门用来比较两个变量的值是否相等,也就是用于比较变量所对应的内存中所存储的数值是否相同,要比较两个基本类型的数据或两个引用变量是否相等,只能用==操作符。 如果一个变量指向的数据是对象类型 阅读全文
posted @ 2017-08-08 20:09 这个手杀不太0 阅读(517) 评论(0) 推荐(0)
摘要: Roman to Integer Given a roman numeral, convert it to an integer. Input is guaranteed to be within the range from 1 to 3999. 阅读全文
posted @ 2017-08-08 19:39 这个手杀不太0 阅读(142) 评论(0) 推荐(0)