Solución
solution.tsTypeScript
export function prefixSum(nums: number[]): number[] {
// Escribe tu solución aquí
return nums.reduce((acc, element, index) => {
acc[index] = element + (acc[index - 1] || 0)
return acc;
}, [])
}0respuestas