Your Input: 1 1 3 3 6 6 8 8 2
Expected output is 1
I think something is wrong with “See expected Output”
Your Input: 1 1 3 3 6 6 8 8 2
Expected output is 1
I think something is wrong with “See expected Output”
First number is the size of the array, so with your input it thinks that it is the array [1].
I think that you meant to have the input 9 1 1 3 3 6 6 8 8 2 (which outputs 2)