2 ms·
Good luck using that for a big list of strings!
by tshaddox 6y ago
Good luck using that for a big list of strings!
- lomereiter 6y agoIf we are talking about linear in number of characters, an easy answer is building a trie and traversing it left to right. (Cache-friendly variation: https://en.wikipedia.org/wiki/Burstsort https://en.wikipedia.org/wiki/Burstsort)