We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent af9df66 commit eb80366Copy full SHA for eb80366
src/main/java/com/fishercoder/solutions/_31.java
@@ -1,20 +1,5 @@
1
package com.fishercoder.solutions;
2
3
-/**
4
- * 31. Next Permutation
5
-
6
-Implement next permutation, which rearranges numbers into the lexicographically next greater permutation of numbers.
7
8
-If such arrangement is not possible, it must rearrange it as the lowest possible order (ie, sorted in ascending order).
9
10
-The replacement must be in-place, do not allocate extra memory.
11
12
-Here are some examples. Inputs are in the left-hand column and its corresponding outputs are in the right-hand column.
13
-1,2,3 → 1,3,2
14
-3,2,1 → 1,2,3
15
-1,1,5 → 1,5,1
16
- */
17
18
public class _31 {
19
public static class Solution1 {
20
/**
0 commit comments