@@ -180,7 +180,7 @@ class Solution {
180180
181181 private int solve (int n , int m ) {
182182 PriorityQueue<int[]> pq = new PriorityQueue<> (Comparator . comparingInt(a - > a[0 ]));
183- pq. add(new int []{n, n});
183+ pq. add(new int [] {n, n});
184184 Set<Integer > visited = new HashSet<> ();
185185
186186 while (! pq. isEmpty()) {
@@ -204,7 +204,7 @@ class Solution {
204204 s[i] = (char ) (s[i] + 1 );
205205 int next = Integer . parseInt(new String (s));
206206 if (! sieve[next] && ! visited. contains(next)) {
207- pq. add(new int []{sum + next, next});
207+ pq. add(new int [] {sum + next, next});
208208 }
209209 s[i] = c;
210210 }
@@ -213,7 +213,7 @@ class Solution {
213213 s[i] = (char ) (s[i] - 1 );
214214 int next = Integer . parseInt(new String (s));
215215 if (! sieve[next] && ! visited. contains(next)) {
216- pq. add(new int []{sum + next, next});
216+ pq. add(new int [] {sum + next, next});
217217 }
218218 s[i] = c;
219219 }
@@ -283,6 +283,7 @@ private:
283283 }
284284 return -1;
285285 }
286+
286287public:
287288 int minOperations(int n, int m) {
288289 runSieve();
0 commit comments