Source: wikibot/shortlex-order
= Shortlex order
{wiki=Shortlex_order}
Shortlex order is a method of ordering sequences, typically strings or lists, based on their length and lexicographic (dictionary) order. Here's how it works: 1. **Length Order**: Sequences are first grouped by their length. All sequences of a shorter length come before sequences of a longer length. 2. **Lexicographic Order**: Within the same length, sequences are ordered lexicographically.