integer-sorting/radix-sort

View on GitHub
src/array/core/loadLengths.js

Summary

Maintainability
A
0 mins
Test Coverage
const loadLengths = (tuples, i, N, buffer) => {
    let maxLength = 0;
    for (; i < N; ++i) {
        const tuple = tuples[i];
        buffer[i] = tuple.length;
        maxLength = Math.max(maxLength, tuple.length);
    }

    return maxLength + 1;
};

export default loadLengths;