Lexicographically sorted list of lists of strings

前端 未结 4 1577
轻奢々
轻奢々 2021-01-19 05:39

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:



        
4条回答
  •  终归单人心
    2021-01-19 06:11

    You can also use

    myList = myList.OrderBy(arr => arr[0])
                    .ThenBy(arr => arr[1])
                    .ThenBy(arr => arr[2])
                    .ToList();
    

提交回复
热议问题