union-find/contiguous

View on GitHub
src/fundamentals/nulls.js

Summary

Maintainability
A
0 mins
Test Coverage
export default function nulls(n, List = Array) {
    const a = new List(n);

    for (let i = 0; i < n; ++i) a[i] = -1;

    return a;
}