AC: Next Permutation

Find the longest undecreasing subsequence from the tail, swap & sort.