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 ; class GFG { static int countEvenSum ( int [ ] arr , int n ) {