/**
 * @template V
 * @param {V[]} data
 * @param {number} [start]
 * @param {number} [end]
 * @return {number}
 */
export function array_compute_max(data, start = 0, end = data.length) {
    let result = Number.NEGATIVE_INFINITY;

    for (let i = start; i < end; i++) {
        const value = data[i];
        if (value > result) {
            result = value;
        }
    }

    return result;
}
