• + 1 comment

    This would be a wonderful solution, and indeed, it works with the test cases. However, it gives the wrong prediction, when you have 0^0^0 (which is 0, and not 1).

    Try the following input: 5 // 0 0 0 0 0 // 5 // 1 1 // 1 2 // 1 3 // 1 4 // 1 5 Your output will be: Even, Odd, Odd, Odd, Odd. But it should be: Even, Odd, Even, Odd, Even.

    • + 0 comments

      The problem statement says that no consecutive two numbers in the arrays will ever be 0. So this case is ruled out.