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 4b30625 commit 2f9568fCopy full SHA for 2f9568f
src/main/java/com/fishercoder/solutions/_1323.java
@@ -34,7 +34,7 @@
34
* */
35
public class _1323 {
36
public static class Solution1 {
37
- public int maximum69Number (int num) {
+ public int maximum69Number(int num) {
38
char[] chars = Integer.toString(num).toCharArray();
39
IntStream.range(0, chars.length).filter(i -> chars[i] == '6').findFirst().ifPresent(i -> chars[i] = '9');
40
return Integer.parseInt(new String(chars));
0 commit comments