add next-permutation solution