Order a list by the first integer

PHOTO EMBED

Thu Jan 20 2022 07:31:10 GMT+0000 (Coordinated Universal Time)

Saved by @vooda

combinations.OrderBy(x => Int32.Parse(x.Substring(0, 1))).ThenBy(x => Int32.Parse(x.Substring(1, 2)))

content_copyCOPY

The logic is : Split up bunch of string values like element 1, element 2, element 3 then order element 1 in asc or decs as per your requirement and then concatenate with its respective element 2 & 3 example "3 2 1" "8 2 3" "2 1 7" "0 3 1" Becomes 0 3 1 2 1 7 3 2 1 8 2 3