Currently, I am trying to implement a code to generate frequent sequences. In doing so I need to get an in-place sort of a list of lists of strings as follows:
If you want to solve with Sort()
you may use this approach
myList.Sort((x, y) => x.Zip(y,(l1,l2) => string.Compare(l1,l2)).FirstOrDefault(c => c != 0));
Otherwise I would concartenate all items into a single string
and compare those.
This is less efficient because the string objects have to be created first.
myList = myList.OrderBy(string.Concat).ToList();
Sample: https://dotnetfiddle.net/1VmohI