Create two arrays and initialize with 0 s
int [ ] prefix_a = new int [ 10 ] ; int [ ] prefix_b = new int [ 10 ] ; Array . Clear ( prefix_a , 0 , prefix_a . Length ) ; Array . Clear ( prefix_b , 0 , prefix_b . Length ) ;