Skip to content

Commit c092b27

Browse files
author
Gonzalo Diaz
committed
[BUGFIX] sonarqube: arrow function is equivalent to BigInt. Use BigInt directly.
Wrapper functions around built-in type conversion functions should be avoided typescript:S7770
1 parent a727ad4 commit c092b27

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

src/hackerrank/interview_preparation_kit/dynamic_programming/max_array_sum.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ const bigIntMax = (...args: bigint[]): bigint =>
1111
}, BigInt(0));
1212

1313
function maxSubsetSum(arr: number[]): number {
14-
const arrCopy: bigint[] = arr.map((x: number): bigint => BigInt(x));
14+
const arrCopy: bigint[] = arr.map(BigInt);
1515

1616
if (arrCopy.length === 0) {
1717
return 0;

0 commit comments

Comments
 (0)