Google SDE Interview Question 2024 August | Graphs (Dijkstra on Matrix) | On-campus
Google · Question · Posted Jun 2026
Question 1: Swim in Rising Water Problem Statement You are given an n x n integer matrix grid where each value grid[i][j] represents the elevation at that point (i, j). The rain starts to fall. At time t, the depth of the water everywhere is t. You can swim from a square to another 4-directionally adjacent square if and only if the elevation of both squares individually are at most t. You can swim infinite distances in zero time. Return ...
The full answer & interview discussion are available to premium members.
Log in Create a free account