QuestionWe can shift a string by shifting each of its letters to its successive letter.For example,"abc"can be shifted to be"bcd".We can keep shifting the string to form a sequence.For example, we can keep shifting"abc"to form the sequence:"abc" -> "bcd" -> ... -> "xyz".Given an array of stringsstrings, group allstrings[i]that belong to the same shifting sequence. You may return the answer inany order.Example 1:Input: strings = ["abc","bcd","acef","xyz","az","ba","a","z"]
Output: [["acef"],["a","z"],["abc","bcd","xyz"],["az","ba"]]Example 2:Input: strings = ["a"]
Output: [["a"]]Constraints:1 <
...
继续阅读
(13)