Java program to calculate the starting indices of substrings inside S which contains all the words present in List L .
import java . util . ArrayList ; import java . util . Arrays ; import java . util . HashMap ; import java . util . List ; class GFG {