Learn
Practice
Newsletter
Resources
F
Toggle theme
0
F
Toggle theme
0
Toggle menu
← Back to All Animations
Shortest Path Visiting All Nodes
Bookmark
Input
Standard
Small
Triangle
Custom
graph
=
[[1,2,3],[0],[0],[0]]
0
1
2
3
DP Table (mask, ending node)
0
1
2
3
algo
master
.
io
Step:
Start: Shortest Path Visiting All 4 Nodes using BFS + Bitmask DP
0 / 123
Input
Standard
Small
Triangle
Custom
graph
=
[[1,2,3],[0],[0],[0]]
0 / 123
0
1
2
3
DP Table (mask, ending node)
0
1
2
3
algo
master
.
io
Step:
Start: Shortest Path Visiting All 4 Nodes using BFS + Bitmask DP