Print all the combination of substrings from a given string in order by letter
问题 This question has been asked and answered plenty of times before. However, I'm specifically asking for the substrings to be printed in the specific order by each letter as shown in the output. import java.util.*; public static void main(String[] args) { breakWordIntoPieces("ABIGWORD"); } public static void breakWordIntoPieces(String str) { if (str.length() > 1) // I'm skipping all substrings of less than 2 letters { List<String> fragments = breakWordIntoPiecesFromRightToLeft(str); for (String