Skip to content

Commit 6b0a7f3

Browse files
authored
Update 2218-maximum-value-of-k-coins-from-piles.js
1 parent 89c8431 commit 6b0a7f3

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

2218-maximum-value-of-k-coins-from-piles.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -32,7 +32,8 @@ const maxValueOfCoins = function(piles, k) {
3232
const memo = Array.from({ length: n + 1 }, () => Array(k + 1).fill(null))
3333
return helper(0, k)
3434

35-
// TC: O(n * m)
35+
// TC: O(k * m)
36+
// k: k
3637
// n: length of piles
3738
// m: sum(piles[i]), total elements of all piles
3839
function helper(i, k) {

0 commit comments

Comments
 (0)