Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
1514. Path with Maximum Probability
Bookmark
Input
3 Nodes (A)
3 Nodes (B)
5 Nodes
Custom
n
=
3
,
edges
=
[[0,1],[1,2],[0,2]]
,
succProb
=
[0.5, 0.5, 0.2]
,
startNode
=
0
,
endNode
=
2
Path with Maximum Probability (0 → 2)
0.5
0.5
0.2
0
1
2
1.0
0.0
0.0
Probabilities:
0
1.0
1
0.0
2
0.0
Max-Heap (Priority Queue):
(empty)
Legend:
Unvisited
Current
Checking
Visited
Start
End
algo
master
.
io
Step:
Initialize: build adjacency list from edges and probabilities.
0 / 19
Input
3 Nodes (A)
3 Nodes (B)
5 Nodes
Custom
n
=
3
,
edges
=
[[0,1],[1,2],[0,2]]
,
succProb
=
[0.5, 0.5, 0.2]
,
startNode
=
0
,
endNode
=
2
0 / 19
Path with Maximum Probability (0 → 2)
0.5
0.5
0.2
0
1
2
1.0
0.0
0.0
Probabilities:
0
1.0
1
0.0
2
0.0
Max-Heap (Priority Queue):
(empty)
Legend:
Unvisited
Current
Checking
Visited
Start
End
algo
master
.
io
Step:
Initialize: build adjacency list from edges and probabilities.