private List<List<Integer>> helper2(int[] num, int pos) {

    List<List<Integer>> rst = new ArrayList<List<Integer>>();
    if (num == null || num.length == 0) {
      return rst;
    } else if (pos == num.length - 1) {
      List<Integer> list = new ArrayList<Integer>();
      list.add(num[pos]);
      rst.add(list);
      return rst;
    }

    List<List<Integer>> lastRst = helper2(num, pos + 1);

    for (List<Integer> lastRstList : lastRst) {
      for (int i = 0 ; i <= lastRstList.size() ; i++) {
        List<Integer> curtList = new ArrayList<Integer>(lastRstList);
        curtList.add(i, num[pos]);
        rst.add(curtList);
      }
    }
    return rst;
  }