lintcode 211 字符串置换

采用设置标志数组的方法,一定程度上降低了时间复杂度;
public class Solution {
    /*
     * @param A: a string
     * @param B: a string
     * @return: a boolean
     */
    public boolean Permutation(String A, String B) {
        // write your code here
        if(A.length() !=B.length()){
            return false;
        }
        
        int [] a = new int [256];
         for (int i = 0; i


你可能感兴趣的:(lintcode)