why my solution of DESTROY problem wrong?

my solution link is link text

@vijju123 please answer.

please answer if anyone knows or has solved this problem

Sorry, i didnt have a look here. Looking into the question right away.

Theres the counter case-

Input
1
6
1 2 3 3 5 6
Your Output
4
Expected Output
3 //Remove 1,3 then 2,3 and then 5,6.

Thanks for your reply

//