Function to print the number of characters having odd frequencies for each query
static void queryResult ( int [ ] prefix , pair Q ) { int l = Q . first ; int r = Q . second ; if ( l == 0 ) { int xorval = prefix [ r ] ; Console . Write ( countSetBits ( xorval ) + " STRNEWLINE " ) ; } else { int xorval = prefix [ r ] ^ prefix [ l - 1 ] ; Console . Write ( countSetBits ( xorval ) + " STRNEWLINE " ) ; } }