Cppreference Next Permutation Leetcode