类别归档:LeetCode

LeetCode OJ is a platform for preparing technical coding interviews.

RSS feed of LeetCode

[LeetCode]Next Permutation

题目描述:

LeetCode 31. Next Permutation

Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.

If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order).

The ...

继续阅读