Learn
Practice
Interview
Resources
Newsletter
F
Toggle theme
0
F
0
Toggle menu
Animations
← Back to All Animations
Find Minimum Time to Reach Last Room I
Bookmark
BFS Relaxation
Dijkstra
Input
2x2 (ans=6)
2x3 (ans=3)
3x4 (ans=5)
Custom
moveTime
=
[[0,4],[4,4]]
0
1
0
1
start
dest
0
d=0
4
d=inf
4
d=inf
4
d=inf
min-heap
Default
Active
Visited
Checking
0
1
0
1
start
dest
0
d=0
4
d=inf
4
d=inf
4
d=inf
min-heap
Default
Active
Visited
Checking
0
1
0
1
start
dest
0
d=0
4
d=inf
4
d=inf
4
d=inf
min-heap
Default
Active
Visited
Checking
0
1
0
1
start
dest
0
d=0
4
d=5
4
d=inf
4
d=inf
min-heap
Default
Active
Visited
Checking
0
1
0
1
start
dest
0
d=0
4
d=5
4
d=5
4
d=inf
min-heap
Default
Active
Visited
Checking
0
1
0
1
start
dest
0
d=0
4
d=5
4
d=5
4
d=inf
min-heap
Default
Active
Visited
Checking
0
1
0
1
start
dest
0
d=0
4
d=5
4
d=5
4
d=6
min-heap
Default
Active
Visited
Checking
0
1
0
1
start
dest
0
d=0
4
d=5
4
d=5
4
d=6
min-heap
Default
Active
Visited
Checking
0
1
0
1
start
dest
0
d=0
4
d=5
4
d=5
4
d=6
min-heap
Default
Active
Visited
Checking
0
1
0
1
start
dest
0
d=0
4
d=5
4
d=5
4
d=6
min-heap
Default
Active
Visited
Checking
0
1
0
1
start
dest
0
d=0
4
d=5
4
d=5
4
d=6
min-heap
Default
Active
Visited
Checking
algo
master
.
io
Step:
Set every arrival time to infinity except the start, on a 2 x 2 grid
0 / 42
Input
2x2 (ans=6)
2x3 (ans=3)
3x4 (ans=5)
Custom
moveTime
=
[[0,4],[4,4]]
0 / 42
algo
master
.
io
Step:
Set every arrival time to infinity except the start, on a 2 x 2 grid