Cppreference Next Permutation Leetcode Solnet