Function to generate all possible strings from the given array
static ArrayList < String > helper ( ArrayList < String > arr , int ind ) { ArrayList < String > fin = new ArrayList < > ( ) ; fin . add ( " " ) ;