Circular XOR Array Validation - Coding problem | OneNoughtOne