I don't quite understand the question. Successive letter means in alphabet order or the next letter in the string. And is "ba" the result of shifting "az" to the right? And we can't shift "az" to the left because z is the last letter in the alphabet?
@sherryxmhe Yes, I think they make a to z is a circle, z's next is a.
You misunderstand the problem.
"shift" each of its letter to its successive letter
"acef", "cefg" are not in the same group.
The rule is to shift 'a' to 'b', 'c' to 'd', ...
so "acef" and "bdfg" are in the same group.
Looks like your connection to LeetCode Discuss was lost, please wait while we try to reconnect.