Skip to content

Commit c2b3192

Browse files
committed
Runtime: 82 ms (Top 52.25%) | Memory: 75.8 MB (Top 66.61%)
1 parent bf36010 commit c2b3192

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

scripts/algorithms/P/Path with Maximum Probability/Path with Maximum Probability.java

+3-2
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 82 ms (Top 52.25%) | Memory: 75.8 MB (Top 66.61%)
12
class Pair{
23
int to;
34
double prob;
@@ -28,7 +29,7 @@ public double maxProbability(int n, int[][] edges, double[] succProb, int start,
2829
if(((curr.prob)*(x.prob))>probs[x.to]){
2930
probs[x.to]=((curr.prob)*(x.prob));
3031
pq.offer(new Pair(x.to,probs[x.to]));
31-
32+
3233
}
3334
else{
3435
continue;
@@ -37,4 +38,4 @@ public double maxProbability(int n, int[][] edges, double[] succProb, int start,
3738
}
3839
return probs[end];
3940
}
40-
}
41+
}

0 commit comments

Comments
 (0)