Skip to content

Commit 255c373

Browse files
committed
[REFACTOR] [Hacker Rank] Interview Preparation Kit: Dynamic Programming: Max Array Sum.
* Adjusted the interface to match what hackerrank expects.
1 parent 4944eb5 commit 255c373

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/hackerrank/interview_preparation_kit/dynamic_programming/max_array_sum.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@
66
const bigIntMax = (...args) =>
77
args.reduce((m, e) => (e > m ? e : m), BigInt(0));
88

9-
export function maxSubsetSum(arr) {
9+
function maxSubsetSum(arr) {
1010
const arrCopy = arr.map((x) => BigInt(x));
1111

1212
if (arrCopy.length === 0) {
@@ -32,3 +32,4 @@ export function maxSubsetSum(arr) {
3232
}
3333

3434
export default { maxSubsetSum };
35+
export { maxSubsetSum };

0 commit comments

Comments
 (0)