摘要:
一道非常经典的dfspublic class Solution { String[] keybd ={"","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; // http://www.cnblogs.com/springfor... 阅读全文
posted @ 2015-05-29 12:17
世界到处都是小星星
阅读(158)
评论(0)
推荐(0)
摘要:
public class Solution { public String longestCommonPrefix(String[] strs) { //http://www.cnblogs.com/springfor/p/3872316.html if(strs=... 阅读全文
posted @ 2015-05-29 08:45
世界到处都是小星星
阅读(98)
评论(0)
推荐(0)
摘要:
烧脑神题public class Solution { public boolean isMatch(String s, String p) { // 反正我是想不出来 http://www.cnblogs.com/springfor/p/3893593.html ... 阅读全文
posted @ 2015-05-29 07:42
世界到处都是小星星
阅读(118)
评论(0)
推荐(0)
摘要:
Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.public class Solution { public boolean isPalindrome(int ... 阅读全文
posted @ 2015-05-29 05:57
世界到处都是小星星
阅读(110)
评论(0)
推荐(0)
摘要:
极值问题public class Solution { public int myAtoi(String str) { // 要考虑清楚极值问题 if(str==null || str.length()==0) return 0; int i=0, r... 阅读全文
posted @ 2015-05-29 05:44
世界到处都是小星星
阅读(188)
评论(0)
推荐(0)
摘要:
这道题不考虑越界问题的话,最粗暴的解法public class Solution { public int reverse(int x) { int rev =0; while(x!=0){ rev =rev*10+x%10; ... 阅读全文
posted @ 2015-05-29 03:10
世界到处都是小星星
阅读(113)
评论(0)
推荐(0)
摘要:
public class Solution { public String convert(String s, int numRows) { // http://www.cnblogs.com/springfor/p/3889414.html // 略无聊,就是斜角... 阅读全文
posted @ 2015-05-29 02:59
世界到处都是小星星
阅读(666)
评论(0)
推荐(0)
摘要:
关键在于写好helperpublic class Solution { public String longestPalindrome(String s) { if(s==null) return null; if(s.length()==1) return s; ... 阅读全文
posted @ 2015-05-29 00:05
世界到处都是小星星
阅读(160)
评论(0)
推荐(0)
摘要:
http://blog.dato.com/how-to-evaluate-machine-learning-models-part-1-orientationhttp://blog.dato.com/how-to-evaluate-machine-learning-models-part-2a-cl... 阅读全文
posted @ 2015-05-28 07:36
世界到处都是小星星
阅读(140)
评论(0)
推荐(0)
摘要:
暂时理解不了二分那个算法O(n)public class Solution { public int minSubArrayLen(int s, int[] nums) { // http://bookshadow.com/weblog/2015/05/12/leetcode-m... 阅读全文
posted @ 2015-05-28 03:52
世界到处都是小星星
阅读(217)
评论(0)
推荐(0)
浙公网安备 33010602011771号