Skip to content

Commit 99fbfc9

Browse files
committed
Runtime: 133 ms (Top 21.62%) | Memory: 42.3 MB (Top 86.49%)
1 parent 70ed6f5 commit 99fbfc9

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

scripts/algorithms/L/Last Stone Weight II/Last Stone Weight II.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
1+
// Runtime: 133 ms (Top 21.62%) | Memory: 42.3 MB (Top 86.49%)
12
var lastStoneWeightII = function(stones) {
23
var sum = stones.reduce((a, b) => a + b);
34
var target = Math.ceil(sum / 2);
@@ -8,4 +9,4 @@ var lastStoneWeightII = function(stones) {
89
}
910
}
1011
return Math.abs(2 * dp[target] - sum);
11-
};
12+
};

0 commit comments

Comments
 (0)