Skip to content

Commit 2b8094f

Browse files
authored
Update Solution.java
1 parent f9cc8f7 commit 2b8094f

File tree

1 file changed

+0
-25
lines changed

1 file changed

+0
-25
lines changed

src/main/java/g0801_0900/s0869_reordered_power_of_2/Solution.java

Lines changed: 0 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -18,31 +18,6 @@ public boolean reorderedPowerOf2(int n) {
1818
return false;
1919
}
2020

21-
private int noOfDigits(int n) {
22-
if (n == 0) {
23-
return 1;
24-
}
25-
return (int) Math.log10(Math.abs(n)) + 1;
26-
}
27-
28-
private boolean check(int num1, int num2) {
29-
int[] num = new int[10];
30-
while (num1 > 0) {
31-
num[num1 % 10]++;
32-
num1 /= 10;
33-
}
34-
while (num2 > 0) {
35-
num[num2 % 10]--;
36-
num2 /= 10;
37-
}
38-
for (int i = 0; i < 10; i++) {
39-
if (num[i] != 0) {
40-
return false;
41-
}
42-
}
43-
return true;
44-
}
45-
4621
private int[] countDigits(int num) {
4722
int[] digitCount = new int[10];
4823
while (num > 0) {

0 commit comments

Comments
 (0)