Skip to content

Commit 6f30d04

Browse files
refactor 556
1 parent f335b05 commit 6f30d04

File tree

1 file changed

+4
-2
lines changed
  • src/main/java/com/fishercoder/solutions

1 file changed

+4
-2
lines changed

src/main/java/com/fishercoder/solutions/_556.java

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,15 @@
11
package com.fishercoder.solutions;
22

33
/**
4+
* 556. Next Greater Element III
5+
*
46
* Given a positive 32-bit integer n, you need to find the smallest 32-bit integer which has exactly the same digits existing
57
* in the integer n and is greater in value than n. If no such positive 32-bit integer exists, you need to return -1.
6-
* <p>
8+
*
79
* Example 1:
810
* Input: 12
911
* Output: 21
10-
* <p>
12+
*
1113
* Example 2:
1214
* Input: 21
1315
* Output: -1

0 commit comments

Comments
 (0)