πLexorank
Lexorank is a system to store ordered items in a database that allows efficient reordering.
Each item is assigned a rankβa string. Ranks are sorted lexicographically to get itemsβ order.
When you need to reorder an item, you assign it a rank that is lexicographically between ranks of new neighboring items. For each item re-order, a single row needs to be modified in database.
Resources
Best representation of an ordered list in a database? - Stack Overflow
algorithm - Return a new string that sorts between two given strings - Stack Overflow
Backlinks
- π Β§ Software Design