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

                     int index, int k, int n) {
        for (int i = index; i <= 9; i++) {
            list.add(i);
            if (n == i && list.size() == k) { 
                result.add(new ArrayList<>(list));
            } else if (n > i){
                dfs(result, list, i + 1, k, n - i);
            }
            list.remove(list.size() - 1);
        }
    }
private void sample_funcname ( List < List < Integer >> result , List < Integer > list , int index , int k , int n ) {
  for ( int i = index ;
  i <= 9 ;
  i ++ ) {
    list . add ( i ) ;
    if ( n == i && list . size ( ) == k ) {
      result . add ( new ArrayList < > ( list ) ) ;
    }
    else if ( n > i ) {
      dfs ( result , list , i + 1 , k , n - i ) ;
    }
    list . remove ( list . size ( ) - 1 ) ;
  }
}
