Stores prefix and suffix sums
let prefix = new Array ( N + 2 ) ; let suffix = new Array ( N + 2 ) ; for ( let i = 0 ; i < N + 2 ; i ++ ) { prefix [ i ] = 0 ; } for ( let i = 0 ; i < N + 2 ; i ++ ) { suffix [ i ] = 0 ; }