
grid 2차원 순회function minimumOperations(grid: number[][]): number {
let operation = 0
for(let col = 0; col < grid[0].length; col++) {
for(let row = 1; row < grid.length; row++) {
if(grid[row][col] > grid[row - 1][col]) continue
const gap = grid[row - 1][col] - grid[row][col] + 1
operation += gap
grid[row][col] += gap
}
}
return operation
};