subject : The original title is link ( Simple )
label : Array
solution
Time complexity
Spatial complexity
Execution time
Ans 1 (Python)
O ( N × M )
O ( 1 )
40ms (60.83%)
Ans 2 (Python)
Ans 3 (Python)
Solution 1 :
class Solution:
def maximumWealth(self, accounts: List[List[int]]) -> int:
return max(sum(row) for row in accounts)