C # program to count number of sub - arrays with even sum using an efficient algorithm Time Complexity - O ( N ) Space Complexity - O ( 1 )
using System ; public class GFG { public static long countEvenSum ( int [ ] a , int n ) {