Pref [ ] stores the prefix sum Suff [ ] stores the suffix sum
List < int > preff = new List < int > ( ) ; List < int > suff = new List < int > ( ) ; int ct = 0 ; for ( i = 0 ; i < N ; i ++ ) { a = v [ i ] ;