K-th-permutation-in-lexicographic-order (en) Copyright (C) Paweł Maśluch, 2021. All rights reserved. K-th (in lexicographic order) permutation of {1..N} set. (C++, Windows).