Skip to content

Commit a8281d4

Browse files
committed
Next highest number Java
1 parent d0775e1 commit a8281d4

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

solutions/java/NextHighestNumber.java

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,10 @@
11
public class NextHighestNumber {
2-
2+
/***
3+
* Convert int into character array. Starting from the end, compare each
4+
* number with all numbers before it, one at a time. At any moment we find a
5+
* number greater than any of its previous numbers, we swap them, and return
6+
* the converted int.
7+
*/
38
public static void main(String[] args) {
49
// TODO Auto-generated method stub
510
NextHighestNumber nhn = new NextHighestNumber();

0 commit comments

Comments
 (0)