3 ms·
Wouldn't you hit Python's recursive limit rather quickly doing this? There might be a way to avoid messing with the recursive depth if you swapped out the main
by shakna 10y ago
Wouldn't you hit Python's recursive limit rather quickly doing this?
There might be a way to avoid messing with the recursive depth if you swapped out the main part of the for loop for a generator though.
- Veedrac 10y agoYou'd need to be finding the permutations for a list ~1000 elements long, but for such a list there are far too many permutations for such a request to be meaningful.