@@ -183,7 +183,7 @@ class Solution {
183183
184184 private int solve (int n , int m ) {
185185 PriorityQueue<int[]> pq = new PriorityQueue<> (Comparator . comparingInt(a - > a[0 ]));
186- pq. add(new int []{n, n});
186+ pq. add(new int [] {n, n});
187187 Set<Integer > visited = new HashSet<> ();
188188
189189 while (! pq. isEmpty()) {
@@ -207,7 +207,7 @@ class Solution {
207207 s[i] = (char ) (s[i] + 1 );
208208 int next = Integer . parseInt(new String (s));
209209 if (! sieve[next] && ! visited. contains(next)) {
210- pq. add(new int []{sum + next, next});
210+ pq. add(new int [] {sum + next, next});
211211 }
212212 s[i] = c;
213213 }
@@ -216,7 +216,7 @@ class Solution {
216216 s[i] = (char ) (s[i] - 1 );
217217 int next = Integer . parseInt(new String (s));
218218 if (! sieve[next] && ! visited. contains(next)) {
219- pq. add(new int []{sum + next, next});
219+ pq. add(new int [] {sum + next, next});
220220 }
221221 s[i] = c;
222222 }
@@ -286,6 +286,7 @@ private:
286286 }
287287 return -1;
288288 }
289+
289290public:
290291 int minOperations(int n, int m) {
291292 runSieve();
0 commit comments