摘要:
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... 阅读全文
摘要:
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 阅读全文
摘要:
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) ... 阅读全文