2 ms·
There is a rule that works for all cases. It's lexicographical sorting. Simple. Consistent. Easy to manipulate to get what you want.
by freeopinion 1y ago
There is a rule that works for all cases. It's lexicographical sorting.
Simple. Consistent. Easy to manipulate to get what you want.
- Wowfunhappy 1y agoWe just discussed a situation where lexicographical sorting doesn’t work. Adding in a rule to treat consecutive digits as one number doesn’t significantly complicate the logic and makes sorting work for a major additional use case. It doesn’t magically fix every case but it fixes a common one with minimal downsides.