Sort a list of lists by increasing order of elements
If the sublists have equal lengths,
list[[Ordering[list]]]
{{1, 1, 2, 8}, {1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 4, 5}, {1, 3, 5, 6}}
With possibly unequal lengths:
list[[Ordering[PadRight @ list]]]
{{1, 1, 2, 8}, {1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 4, 5}, {1, 3, 5, 6}}
With equal lengths, the simplest answer, as andre314 says in the comment above, is simply Sort
:
Sort[list]
{{1, 1, 2, 8}, {1, 2, 3, 4}, {1, 2, 4, 3}, {1, 3, 4, 5}, {1, 3, 5, 6}}
With unequal lengths, kglr's Ordering
+ PadRight
approach is probably optimal.