public static List<List<Integer>> fourSum(int[] num, int target) {
    	if (num == null) return null;
        
        List<List<Integer>> ret = new ArrayList<List<Integer>>();
        if (num.length < 4) return ret;
        Arrays.sort(num);
        for (int i = 0; i < num.length-3; ++i) {
        	List<List<Integer>> ret3 = threeSum(num, -num[i], i+1, num.length-1);
        	if (ret3.size() != 0) {
        		for (int j = 0; j < ret3.size(); ++j) {
        			List<Integer> temp = new ArrayList<Integer>();
        			temp.add(num[i]);
        			temp.addAll(ret3.get(j));
        			ret.add(temp);
        		}
        	}
        	
        }
        return ret;
    }