Share this postDaily bit(e) of C++Daily bit(e) of C++ | std::next_permutation, std::prev_permutationCopy linkFacebookEmailNotesMoreDiscover more from Daily bit(e) of C++Random C++ knowledge organized in arbitrary order.Over 1,000 subscribersSubscribeBy subscribing, I agree to Substack's Terms of Use, and acknowledge its Information Collection Notice and Privacy Policy.Already have an account? Sign inDaily bit(e) of C++ | std::next_permutation, std::prev_permutationDaily bit(e) of C++ #365, The two permutation algorithms: std::next_permutation, std::prev_permutation.Šimon TóthJan 01, 20241Share this postDaily bit(e) of C++Daily bit(e) of C++ | std::next_permutation, std::prev_permutationCopy linkFacebookEmailNotesMoreShareThe std::next_permutation and std::prev_permutation algorithms reorder elements of a range into the next/previous lexicographical permutation.If no such permutation exists, both algorithms roll over and return false.Click to open the example in Compiler Explorer.Leave a commentThanks for reading Daily bit(e) of C++! Subscribe for free to receive new posts and support my work.Subscribe1 Like