16 / 26
read the snippet · pick its Big-O
function totalSeats(grid) {let total = 0;for (let r = 0; r < grid.length; r++) {for (let c = 0; c < grid[r].length; c++) {total += grid[r][c];}}return total;}
function totalSeats(grid) {let total = 0;for (let r = 0; r < grid.length; r++) {for (let c = 0; c < grid[r].length; c++) {total += grid[r][c];}}return total;}