Back to course home
0% completed
Vote For New Content
Cursed 1 liner
Hugh Parry
Feb 7, 2025
Boy I hope that the hiring manager at aws will like this
class Solution: def findIslandPerimeter(self, m): return sum(sum(4 - (i > 0 and m[i-1][j]) * 2 - (j > 0 and m[i][j-1]) * 2 for j in range(len(m[0])) if m[i][j]) for i in range(len(m)))
1
0
Comments
Comments
On this page