C ++ program to count number of sub - arrays with even sum using an efficient algorithm Time Complexity - O ( N ) Space Complexity - O ( 1 )
#include <iostream> NEW_LINE using namespace std ; long long countEvenSum ( int a [ ] , int n ) {