← ALL NOTES
Array

778. Swim in Rising Water

On an n×n grid of heights, water rises so its level at time t is t; you can step between adjacent cells only when both heights ≤ t. Find the minimum time to reach the bottom-right from the top-left.…

Loading…