New answers tagged

2

Aside from trivial cases, transforming lexicographic order indices from one ordering to another ordering can can rarely be done more efficiently than unranking the index using the original alphabet ordering, and then ranking the resulting sequence using the new alphabet ordering. That works fine in this case, because after precomputation of a table of size $...


Top 50 recent answers are included