摘要: public class Solution { public int atoi(String str) { if(str.length() == 0 || str == null){ return 0; } str = str.trim(); boolean positiveflag = true; if(str.charAt(0) == '+'){ str = str.substring(1); }else if(str.cha... 阅读全文
posted @ 2014-01-23 16:04 Razer.Lu 阅读(169) 评论(0) 推荐(0) 编辑
摘要: Implement wildcard pattern matching with support for'?'and'*'.'?' Matches any single character.'*' Matches any sequence of characters (including the empty sequence).The matching should cover the entire input string (not partial).The function prototype should be:bool i 阅读全文
posted @ 2014-01-23 14:36 Razer.Lu 阅读(262) 评论(0) 推荐(0) 编辑
摘要: public class Solution { public double findMedianSortedArrays(int A[], int B[]) { int aLen = A.length; int bLen = B.length; if((aLen+bLen) % 2 == 0){ return (getKthElement(A, 0, aLen-1, B, 0, bLen-1, (aLen+bLen)/2) ... 阅读全文
posted @ 2014-01-23 14:30 Razer.Lu 阅读(207) 评论(0) 推荐(0) 编辑