Skip to content

Commit 6e04fd0

Browse files
Merge pull request #37 from rohitkoh123/master
Richest Customer python solution added
2 parents b241aa7 + 24fc490 commit 6e04fd0

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

1372-RichestCustomerWealth.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
class Solution:
2+
def maximumWealth(self, accounts: List[List[int]]) -> int:
3+
maxSum = 0
4+
for row in range(len(accounts)):
5+
runningSum = 0
6+
for col in range(len(accounts[row])):
7+
runningSum =runningSum+ accounts[row][col]
8+
9+
if runningSum>maxSum:
10+
maxSum = runningSum
11+
return(maxSum)
12+
13+

0 commit comments

Comments
 (0)