function fill(out, start, end) { if (end - start > 1) { const middle = Math.floor((start + end) / 2); fill(out, start, middle); fill(out, middle, end); } else if (start < end) { out[start] = start * 2; } } export function allocated(size) { const out = new Array(size); fill(out, 0, size); return out; }