Skip to content

Commit

Permalink
1672
Browse files Browse the repository at this point in the history
  • Loading branch information
isinsuarici committed Jan 31, 2022
1 parent 9151cb9 commit 5824110
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions E_1672_RichestCustomerWealth.java
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
public class Solution {
public int maximumWealth(int[][] accounts) {

int max = 0;
for (int i = 0; i < accounts.length; i++) {
int sum = 0;
for (int j = 0; j < accounts[i].length; j++) {

sum += accounts[i][j];
}

max= Math.max(max,sum);
}
return max;

}
}

0 comments on commit 5824110

Please sign in to comment.