3 ms·
Using a library for computing the permutations I guess? I haven't touched C++ for years but I'd be surprised if the 44 lines include a permutations implementati
by reinhardt 15y ago
Using a library for computing the permutations I guess? I haven't touched C++ for years but I'd be surprised if the 44 lines include a permutations implementation.
- dzorz 15y agonext_permutation is in standard library (header algorithm).
- makmanalp 15y agoFor the curious, STL <algorithm> is one of those things that you wish you knew ages ago. Usually my code is much cleaner after I run through it and replace relevant parts of it with STL stuff. http://www.cplusplus.com/reference/algorithm/ http://www.cplusplus.com/reference/algorithm/