DIY: Group Shifted Strings
Problem statement
Given a list 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
because each character in both ...
Create a free account to view this lesson.
By signing up, you agree to Educative's Terms of Service and Privacy Policy