Skip to content

Commit

Permalink
Format code in README_EN.md file
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme authored Jan 6, 2025
1 parent 2834b41 commit c9fe7c3
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -180,7 +180,7 @@ class Solution {

private int solve(int n, int m) {
PriorityQueue<int[]> pq = new PriorityQueue<>(Comparator.comparingInt(a -> a[0]));
pq.add(new int[]{n, n});
pq.add(new int[] {n, n});
Set<Integer> visited = new HashSet<>();

while (!pq.isEmpty()) {
Expand All @@ -204,7 +204,7 @@ class Solution {
s[i] = (char) (s[i] + 1);
int next = Integer.parseInt(new String(s));
if (!sieve[next] && !visited.contains(next)) {
pq.add(new int[]{sum + next, next});
pq.add(new int[] {sum + next, next});
}
s[i] = c;
}
Expand All @@ -213,7 +213,7 @@ class Solution {
s[i] = (char) (s[i] - 1);
int next = Integer.parseInt(new String(s));
if (!sieve[next] && !visited.contains(next)) {
pq.add(new int[]{sum + next, next});
pq.add(new int[] {sum + next, next});
}
s[i] = c;
}
Expand Down Expand Up @@ -283,6 +283,7 @@ private:
}
return -1;
}

public:
int minOperations(int n, int m) {
runSieve();
Expand Down

0 comments on commit c9fe7c3

Please sign in to comment.