(int[][] graph)
| 17 | } |
| 18 | |
| 19 | public List<List<Integer>> allPathsSourceTarget(int[][] graph) { |
| 20 | List<Integer> sublist = new ArrayList<Integer>(); |
| 21 | List<List<Integer>> list = new ArrayList<List<Integer>>(); |
| 22 | sublist.add(0); |
| 23 | backTrack(graph,0,list,sublist); |
| 24 | return list; |
| 25 | } |
| 26 | } |