public List<List<String>> groupStrings(String[] strings) {
List<List<String>> res = new ArrayList<>();
if (strings == null || strings.length == 0) {
Map<String, List<String>> map = new HashMap<>();
for (String str : strings) {
StringBuilder key = new StringBuilder();
for (int i = 1; i < str.length(); i++) {
int offset = (str.charAt(i) - str.charAt(i - 1) + 26) % 26;
String k = key.toString();
if (!map.containsKey(k)) {
map.put(k, new LinkedList<>());
res = new ArrayList<>(map.values());