Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import { logger as console } from '../../../logger.js';
function arrayManipulation(n, queries) {
const LENGTH = n + 1;
const SURROGATE_VALUE = 0;
const result = Array(LENGTH).fill(SURROGATE_VALUE);
const result = new Array(LENGTH).fill(SURROGATE_VALUE);
let maximum = 0;

for (const query of queries) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ function arrayManipulation(n, queries) {
// last slot for storing accumSum result
const LENGTH = n + 2;
const INITIAL_VALUE = 0;
const result = Array(LENGTH).fill(INITIAL_VALUE);
const result = new Array(LENGTH).fill(INITIAL_VALUE);
let maximum = 0;

for (const query of queries) {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
import { logger as console } from '../../../logger.js';

function extraLongFactorials(n) {
const rs = [...Array(n)].reduce((a, b, i) => a * BigInt(i + 1), 1n);
const rs = new Array(n).fill().reduce((a, b, i) => a * BigInt(i + 1), 1n);
return rs;
}

Expand Down