<awangdev>40. Combination Sum II_1.java
private void dfs(List<List<Integer>> result, List<Integer> list,

                     int[] candidates, int index, int target) {
        if (target == 0) {
            result.add(new ArrayList<>(list));
            return;
        }
        for (int i = index; i < candidates.length; i++) {
            if (i > index && candidates[i] == candidates[i - 1]) continue;

            int value = candidates[i];
            list.add(value);
            if (target - value >= 0) dfs(result, list, candidates, i + 1, target - value);
            list.remove(list.size() - 1); 
        }
    }
private void sample_funcname ( List < List < Integer >> result , List < Integer > list , int [ ] candidates , int index , int target ) {
  if ( target == 0 ) {
    result . add ( new ArrayList < > ( list ) ) ;
    return ;
  }
  for ( int i = index ;
  i < candidates . length ;
  i ++ ) {
    if ( i > index && candidates [ i ] == candidates [ i - 1 ] ) continue ;
    int value = candidates [ i ] ;
    list . add ( value ) ;
    if ( target - value >= 0 ) dfs ( result , list , candidates , i + 1 , target - value ) ;
    list . remove ( list . size ( ) - 1 ) ;
  }
}
