We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d4ee8ab commit f5f933eCopy full SHA for f5f933e
1672-richest-customer-wealth.js
@@ -0,0 +1,19 @@
1
+/**
2
+ * @param {number[][]} accounts
3
+ * @return {number}
4
+ */
5
+ var maximumWealth = function(accounts) {
6
+ const bankNum = accounts[0].length;
7
+ const customNum = accounts.length;
8
+ let maxWealth = 0;
9
+ for ( let i = 0; i < customNum; i++ ) {
10
+ let tempMaxWealth = 0;
11
+ for ( let k = 0; k < bankNum; k++ ) {
12
+ tempMaxWealth += accounts[i][k];
13
+ }
14
+ if (tempMaxWealth > maxWealth) {
15
+ maxWealth = tempMaxWealth;
16
17
18
+ return maxWealth;
19
+};
README.md
@@ -1,4 +1,5 @@
Record LeetCode.
+[1672. 最富有客户的资产总量](./1672-richest-customer-wealth.js)
[73. 矩阵置零](./73-set-matrix-zeroes.js)
[26. 删除有序数组中的重复项](./26-remove-duplicates-from-sorted-array.js)
0 commit comments