orangesRotting = function(grid, minutes = 2) {
    while (expireFresh(grid, minutes)) minutes++;/* Time O((ROWS * COLS)^2) */

    return !hasFresh(grid)                       /* Time O(ROWS * COLS) */
        ? (minutes - 2)
        : -1;
}
https://leetcode.com/problems/rotting-oranges/
Time O((ROWS * COLS)^2) | Space O(1)
@param {number[][]} grid
@return {number}