Pocket Mine 5 hidden achievement

Let’s Do This – 20 pts (Hidden)
Shuffle 3 mythical cards in one shuffle

Dream Run – 20 pts (Hidden)
Shuffle 3 5-stars cards in one shuffle

Treasure Hunter – 15 pts (Hidden)
Get 3 treasure-related powerups in one shuffle

Gold Digger – 15 pts (Hidden)
Get 3 gold-related powerups in one shuffle

Is This Real Life!? (Hidden)
Shuffle 3 mythical 5-stars cards in one shuffle

Leetcode: Subsets II (also work with no dups)

public class Solution {
    public ArrayList<ArrayList<Integer>> subsetsWithDup(int[] S) {
        // Sort first
        Arrays.sort(S);

        ArrayList<ArrayList<Integer>> result = new ArrayList<ArrayList<Integer>>();
        // create a boolean array to track progress
        boolean[] b = new boolean[S.length];
        while (true) {
            // output a good subset
            result.add(getR(b, S));
            int i = 0;
            while (i < S.length) {
                if (b[i] == false) {
                    // if current position is false, just market it true and break;
                    b[i] = true;
                    break;
                } else {
                    // see if next position has same character
                    int k=i+1;
                    while(k<S.length&&S[k]==S[i]&&b[k]==true){
                        k++;
                    }
                    if(k==S.length){
                        // reach the end, break;
                        i=k;
                        break;
                    }
                    if(S[k]==S[i]){
                        // found a dup character that has false, just mark it true and break;
                        b[k]=true;
                        break;
                    }else{
                        // all same dup is true, mark everything false and go on
                        while(i<k){
                            b[i] = false;
                            i++;
                        }
                    }
                }
            }
            if (i == S.length)
                break;
        }
        return result;
    }
   
    public ArrayList<Integer> getR(boolean[]b,int[]S) {
        ArrayList<Integer> r=new ArrayList<Integer>();
        for(int i=0;i<b.length;i++){
            if(b[i])r.add(S[i]);
        }
        return r;
    }
}

Leetcode: Regular Expression Matching

public class Solution {
    public boolean isMatch(String s, String p) {
        //simple match
        if(p.length()==0&&s.length()>0)return false;
        if(p.length()==0&&s.length()==0)return true;
        if(s.length()==0){
            if(p.length()>1&&p.charAt(1)=='*')
                return isMatch(s,p.substring(2));
            else return false;
        }

        // p and s must has length great than 0 from here  
        if(p.length()==1){
            if(p.charAt(0)==s.charAt(0)||p.charAt(0)=='.')
                return isMatch(s.substring(1),p.substring(1));
            else return false;
        }else{
            if(p.charAt(1)=='*'){
                if(p.charAt(0)==s.charAt(0)||p.charAt(0)=='.')
                    return isMatch(s.substring(1),p.substring(0))||
                        isMatch(s.substring(0),p.substring(2));
                else
                    return isMatch(s.substring(0),p.substring(2));
            }else{
                if(p.charAt(0)==s.charAt(0)||p.charAt(0)=='.')
                    return isMatch(s.substring(1),p.substring(1));
                else return false;
            }
        }
    }
}

Leetcode: Container With Most Water

public class Solution {
    public int maxArea(int[] height) {
        int i=0,j=height.length-1;
        int result=0;
        while(i<j){
            if(result<Math.min(height[i],height[j])*(j-i)){
                result=Math.min(height[i],height[j])*(j-i);
            }
            if(height[i]<height[j])i++;else j--;
        }
        return result;
    }
}

Leetcode: First Missing Positive

public class Solution {
    public int firstMissingPositive(int[] A) {
        for(int i=0;i<A.length;i++){
            while(A[i]-1>=0&&A[i]<=A.length&&A[A[i]-1]!=A[i]){
                int t=A[i];
                int temp=A[t-1];
                A[t-1]=A[i];
                A[i]=temp;
            }
        }
        int i=0;
        for(i=0;i<A.length;i++){
            if(i+1!=A[i])break;
        }
        return i+1;
    }
}

放手走路

斐斐很早就喜欢站,不喜欢爬。所以脚部力量比手部力量发达,走路也比较早。在不到11个月她就能自己走几步了,这是6月11号前拍的:

现在更加是走得好了,这是7月3号拍的:

这是7月24号拍的:

虽然她自己走还是怕怕的,也摔过几次,不过能在一岁前走成这样我已经很满意了,据说我自己一岁才走呢。有一次我护着她走,但是不碰到她,她都走了十米左右,从垫子上走到地板上,还稍微拐了点弯。有几次我和小燕子面对面坐让她走,她完全都自己走来走去,连转弯都不用我们帮忙。其实就算她不会走,我也不着急啦。有些人1岁还不会走呢。