Skip to content

Commit

Permalink
Fix spacing in README.md code examples
Browse files Browse the repository at this point in the history
  • Loading branch information
yanglbme authored Jan 6, 2025
1 parent 9295858 commit 2834b41
Showing 1 changed file with 4 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,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 @@ -207,7 +207,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 @@ -216,7 +216,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 @@ -286,6 +286,7 @@ private:
}
return -1;
}

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

0 comments on commit 2834b41

Please sign in to comment.