Problem 1970 · Hard

Last Day Where You Can Still Cross

Find the last day on which a path of land still connects the top and bottom rows as cells flood. The visual adds cells in reverse with union-find to merge land components.

Open the interactive visualisation