private void dfs(List<List<Integer>> res, List<Integer> bucket, int k, int n, int sum) {
    	if (bucket.size() == k) {
    		if (sum == n) {
    			res.add(new ArrayList<Integer>(bucket));
    		}    		
    	} else {
    		int x = bucket.isEmpty() ? 1 : bucket.get(bucket.size() - 1) + 1;
    		for (int i = x; i <= 9 && i <= n / (k - bucket.size()); i ++) {
    			if (bucket.size() < k && sum + i <= n) {
    				bucket.add(i);
    				dfs(res, bucket, k, n, sum + i);
    				bucket.remove(bucket.size() - 1);
    			}
    		}
    	}
    }