wallsAndGates = function(rooms) {
    const [ rows, cols ] = [ rooms.length, rooms[0].length ];

    for (let row = 0; row < rows; row++) {
        for (let col = 0; col < cols; col++) {
            const isGate = rooms[row][col] === 0;
            if (!isGate) continue;

            dfs(rooms, row, col);
        }
    }
}
https://leetcode.com/problems/walls-and-gates/
Time O(ROWS * COLS) | Space O(ROWS * COLS)
@param {number[][]} rooms
@return {void} Do not return anything, modify rooms in-place instead.