摘要:
一道非常经典的dfspublic class Solution { String[] keybd ={"","","abc","def","ghi","jkl","mno","pqrs","tuv","wxyz"}; // http://www.cnblogs.com/springfor... 阅读全文
摘要:
public class Solution { public String longestCommonPrefix(String[] strs) { //http://www.cnblogs.com/springfor/p/3872316.html if(strs=... 阅读全文
摘要:
烧脑神题public class Solution { public boolean isMatch(String s, String p) { // 反正我是想不出来 http://www.cnblogs.com/springfor/p/3893593.html ... 阅读全文
摘要:
Palindrome NumberDetermine whether an integer is a palindrome. Do this without extra space.public class Solution { public boolean isPalindrome(int ... 阅读全文
摘要:
极值问题public class Solution { public int myAtoi(String str) { // 要考虑清楚极值问题 if(str==null || str.length()==0) return 0; int i=0, r... 阅读全文
摘要:
这道题不考虑越界问题的话,最粗暴的解法public class Solution { public int reverse(int x) { int rev =0; while(x!=0){ rev =rev*10+x%10; ... 阅读全文
摘要:
public class Solution { public String convert(String s, int numRows) { // http://www.cnblogs.com/springfor/p/3889414.html // 略无聊,就是斜角... 阅读全文
摘要:
关键在于写好helperpublic class Solution { public String longestPalindrome(String s) { if(s==null) return null; if(s.length()==1) return s; ... 阅读全文
摘要:
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... 阅读全文
摘要:
暂时理解不了二分那个算法O(n)public class Solution { public int minSubArrayLen(int s, int[] nums) { // http://bookshadow.com/weblog/2015/05/12/leetcode-m... 阅读全文