You are viewing a single comment's thread. Return to all comments →
Factorial number systems allows to solve this problem for O(1) time: https://en.wikipedia.org/wiki/Factorial_number_system
:)
Project Euler #24: Lexicographic permutations
You are viewing a single comment's thread. Return to all comments →
Factorial number systems allows to solve this problem for O(1) time: https://en.wikipedia.org/wiki/Factorial_number_system
:)