Create two arrays and initialize with 0 s
let prefix_a = [ ] ; for ( let i = 0 ; i < 10 ; i ++ ) { prefix_a [ i ] = 0 ; } let prefix_b = [ ] ; for ( let i = 0 ; i < 10 ; i ++ ) { prefix_b [ i ] = 0 ; }