var strings = new List<string>
{ "a", "b", "c", "d", "e", "f", "g", "h", "i", "j", "k", "l", "m", "n", "o", "p" };
int rotation = 4; // could also be 1,2,3,4,5,6,7,8 but 4 is for the sample
我想查询字符串列表并返回包含此数据的匿名类型的分组列表:
group0: a,b,c,d,i,j,k,l
group1: d,e,f,g,m,n,o,p
如果旋转为2,那将是另一个样本:
group0: a,b,e,f,i,j,m,n
group1: c,d,g,h,k,l,o,p
不知何故,我必须检查每个字符串及其索引位置,找到一个聪明的算法并将其与 4 的旋转结合起来。