Function to find XOR of prime frequencies
static int xorOfPrime ( char [ ] s ) { Boolean [ ] prime = new Boolean [ 100005 ] ; for ( int i = 0 ; i < 100005 ; i ++ ) prime [ i ] = true ; SieveOfEratosthenes ( prime , 10005 ) ;