<gouthampradhan>depth_first_search_AllPathsFromSourceToTarget_1.java
private void dfs(
      List<List<Integer>> result, Set<Integer> done, int i, Stack<Integer> stack, int[][] graph) {
    done.add(i);
    stack.push(i);
    int[] children = graph[i];
    if (children.length == 0) {
      List<Integer> childList = new ArrayList<>(stack);
      result.add(childList);
    } else {
      for (int c : children) {
        dfs(result, done, c, stack, graph);
      }
    }
    stack.pop();
    done.remove(i);
  }
private void sample_funcname ( List < List < Integer >> result , Set < Integer > done , int i , Stack < Integer > stack , int [ ] [ ] graph ) {
  done . add ( i ) ;
  stack . push ( i ) ;
  int [ ] children = graph [ i ] ;
  if ( children . length == 0 ) {
    List < Integer > childList = new ArrayList < > ( stack ) ;
    result . add ( childList ) ;
  }
  else {
    for ( int c : children ) {
      dfs ( result , done , c , stack , graph ) ;
    }
  }
  stack . pop ( ) ;
  done . remove ( i ) ;
}
