1
class Solution:
2
def projectionArea(self, grid: List[List[int]]) -> int:
3
total = 0
4

5
# top
6
total += sum([1 for i in grid for j in i if j > 0])
7

8
# front
9
total += sum([max(col) for col in zip(*grid)])
10

11
# side
12
total += sum([max(row) for row in grid])
13

14
return total

0

WPM •0 •0

100%

ACC •0 •0

0s

TIME •0