Cppreference Next Permutation Leetcode Solnecta