5 ms·
I would recommend using an optimized permutations library/generator on the string start and end indices instead of directly manipulating the slices.
by melony 4y ago
I would recommend using an optimized permutations library/generator on the string start and end indices instead of directly manipulating the slices.