4 ms·now sort them alphabeticallyby nom 2y agonow sort them alphabeticallyCodesInChaos 2y agoSorting them lexically would be trivial. Just calculate the index via the reverse permutation, similar to how search works.