Find XOR of first K elements
for i in range ( K ) : NEW_LINE INDENT SubarrayXOR ^= arr [ i ] NEW_LINE DEDENT if ( SubarrayXOR == ( totalXOR ^ SubarrayXOR ) ) : NEW_LINE INDENT return True NEW_LINE DEDENT for i in range ( K , N ) : NEW_LINE