comefrom: <awangdev>Combinations_1.java
code: private void dfs(List<List<Integer>> result, List<Integer> list, int index, int k, int n) {
  
          for (int i = index; i <= n; i++) {
              list.add(i);
              if (list.size() == k) {
                  result.add(new ArrayList<>(list));
                  list.remove(list.size() - 1);
                  continue;
              }
  
              dfs(result, list, i + 1, k, n);
              list.remove(list.size() - 1);
          }
      }
masked: private void sample_funcname ( List < List < Integer >> result , List < Integer > list , int index , int k , int n ) {
    for ( int i = index ;
    i <= n ;
    i ++ ) {
      list . add ( i ) ;
      if ( list . size ( ) == k ) {
        result . add ( new ArrayList < > ( list ) ) ;
        list . remove ( list . size ( ) - 1 ) ;
        continue ;
      }
      dfs ( result , list , i + 1 , k , n ) ;
      list . remove ( list . size ( ) - 1 ) ;
    }
  }
  