@@ -183,7 +183,7 @@ class Solution {
183
183
184
184
private int solve (int n , int m ) {
185
185
PriorityQueue<int[]> pq = new PriorityQueue<> (Comparator . comparingInt(a - > a[0 ]));
186
- pq. add(new int []{n, n});
186
+ pq. add(new int [] {n, n});
187
187
Set<Integer > visited = new HashSet<> ();
188
188
189
189
while (! pq. isEmpty()) {
@@ -207,7 +207,7 @@ class Solution {
207
207
s[i] = (char ) (s[i] + 1 );
208
208
int next = Integer . parseInt(new String (s));
209
209
if (! sieve[next] && ! visited. contains(next)) {
210
- pq. add(new int []{sum + next, next});
210
+ pq. add(new int [] {sum + next, next});
211
211
}
212
212
s[i] = c;
213
213
}
@@ -216,7 +216,7 @@ class Solution {
216
216
s[i] = (char ) (s[i] - 1 );
217
217
int next = Integer . parseInt(new String (s));
218
218
if (! sieve[next] && ! visited. contains(next)) {
219
- pq. add(new int []{sum + next, next});
219
+ pq. add(new int [] {sum + next, next});
220
220
}
221
221
s[i] = c;
222
222
}
@@ -286,6 +286,7 @@ private:
286
286
}
287
287
return -1;
288
288
}
289
+
289
290
public:
290
291
int minOperations(int n, int m) {
291
292
runSieve();
0 commit comments