June 2017
Intermediate to advanced
532 pages
12h 59m
English
The std::next_permutation algorithm is a bit weird to use. This is because it accepts only a begin/end pair of iterators and then returns true if it is able to find the next permutation. Otherwise, it returns false. But what does the next permutation even mean?
The algorithm with which std::next_permutation finds the next lexicographical order of the items, works as follows:
The individually permuted orders we get out of this will always ...
Read now
Unlock full access