Given a positive integer N, return the immediate next greater number with the same digits, or N itself if none exists.
Unlock detailed company stats for this questionUpgrade
Examples: 123 gives 132, 321 gives 321 and 218765 gives 251678.
Community answers
No answers contributed by the community yet.
Related questions
Given a non-negative integer, return the largest number that can be formed by rearranging its digits. Example: 318 gives 831.Given an integer array, return the number of unique products of the digits of each element.For each index of an integer array, return the index of its k-th next greater element.Related courses

Course

Course
Course
