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 f9cc8f7 commit 2b8094fCopy full SHA for 2b8094f
src/main/java/g0801_0900/s0869_reordered_power_of_2/Solution.java
@@ -18,31 +18,6 @@ public boolean reorderedPowerOf2(int n) {
18
return false;
19
}
20
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
46
private int[] countDigits(int num) {
47
int[] digitCount = new int[10];
48
while (num > 0) {
0 commit comments