Problem 2814 · Medium

Minimum Time Takes to Reach Destination Without Drowning

Flood the grid with one BFS to get each cell’s wet minute, then search the traveler route while every step beats the water.

Open the interactive visualisation