std::next_permutation Implementation Explanation
Let’s look at some permutations: 1 2 3 4 1 2 4 3 1 3 2 4 1 3 4 2 1 4 2 3 1 4 3 2 2 1 3 4 … How do we go from one permutation to the next? Firstly, let’s look at things a little differently. We can view … Read more