public void Test_0() { var input = new[] { "abc", "bcd", "acef", "xyz", "az", "ba", "a", "z" }; var output = new List <List <string> >() { new List <string>() { "abc", "bcd", "xyz" }, new List <string>() { "acef" }, new List <string>() { "az", "ba" }, new List <string>() { "a", "z" } }; var sol = new GroupShiftedStrings(); var result = sol.GroupStrings(input); Assert.Equal(output.Count, result.Count); Assert.Equal(output[0], result[0]); Assert.Equal(output[1], result[1]); Assert.Equal(output[2], result[2]); Assert.Equal(output[3], result[3]); }
public void Test_14() { var input = new[] { "az", "yx" }; var output = new List <List <string> >() { new List <string>() { "az", "yx" } }; var sol = new GroupShiftedStrings(); var result = sol.GroupStrings(input); Assert.Equal(output.Count, result.Count); Assert.Equal(output[0], result[0]); }