Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

算法考察:Next Permutation #845

Open
lgwebdream opened this issue Jul 6, 2020 · 1 comment
Open

算法考察:Next Permutation #845

lgwebdream opened this issue Jul 6, 2020 · 1 comment
Labels
爱范儿 company 算法 teach_tag

Comments

@lgwebdream
Copy link
Owner

/* 
  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 replacement must be in-place, do not allocate extra memory.
  Here are some examples. Inputs are in the left-hand column and its corresponding outputs are in the right-hand column.
  1,2,3 → 1,3,2
  3,2,1 → 1,2,3
  1,1,5 → 1,5,1
*/
@lgwebdream lgwebdream added 爱范儿 company 算法 teach_tag labels Jul 6, 2020
@lgwebdream
Copy link
Owner Author

扫描下方二维码,获取答案以及详细解析,同时可解锁800+道前端面试题。

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
爱范儿 company 算法 teach_tag
Projects
None yet
Development

No branches or pull requests

1 participant