<awangdev>Subsets II_6.java
public void dfs(List<List<Integer>> rst, ArrayList<Integer> list, int index, int[] nums) {
        if (!rst.contains(list)) {
            rst.add(new ArrayList<Integer>(list));
        }
        
        for (int i = index; i < nums.length; i++) {
                list.add(nums[i]);
                dfs(rst, list, i + 1, nums);
                list.remove(list.size() - 1);
        }
    }
public void sample_funcname ( List < List < Integer >> rst , ArrayList < Integer > list , int index , int [ ] nums ) {
  if ( ! rst . contains ( list ) ) {
    rst . add ( new ArrayList < Integer > ( list ) ) ;
  }
  for ( int i = index ;
  i < nums . length ;
  i ++ ) {
    list . add ( nums [ i ] ) ;
    dfs ( rst , list , i + 1 , nums ) ;
    list . remove ( list . size ( ) - 1 ) ;
  }
}
