Discover Packages
github.com/openset/leetcode
problems
next-greater-element-iii
package
Version:
v1.4.4
Opens a new window with list of versions in this module.
Published: Sep 2, 2019
License: MIT
Opens a new window with license information.
Imports: 0
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
README
README
¶
< Previous
Next >
556. Next Greater Element III (Medium)
Given a positive 32-bit integer n , you need to find the smallest 32-bit integer which has exactly the same digits existing in the integer n and is greater in value than n. If no such positive 32-bit integer exists, you need to return -1.
Example 1:
Input: 12
Output: 21
Example 2:
Input: 21
Output: -1
[String ]
Similar Questions
Next Greater Element I (Easy)
Next Greater Element II (Medium)
Expand ▾
Collapse ▴
Documentation
¶
There is no documentation for this package.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.