DIY: Group Shifted Strings
Solve the interview question "Group Shifted Strings" in this lesson.
Problem statement
Given an array of strings (lowercase alphabets), we have to group all strings that are shifted versions of each other. For a string abc
, its shifted sequence can be lmn
...