C ++ program to count number of sub - arrays whose sum is even using brute force Time Complexity - O ( N ^ 2 ) Space Complexity - O ( 1 )
#include <iostream> NEW_LINE using namespace std ; int countEvenSum ( int arr [ ] , int n ) { int result = 0 ;