I am getting correct answer for the test case which i am giving.But here it shows WA.Can somebody please give me the case for which my code is not giving correct output.

Logic of my code:-

I have created two boolean arrays with setting the ith element as true where i is given as the the input. Now, for minimum steps, I check if ith number is alive and the three consecutives digits are present and if they are there then I kill all of these by setting them as false and increasing count by one.if there are only two consecutive numbers then I kill both of them and add count by one.

For maximum steps, i simply kills elements from first and deletes the consecutive digits if it is there.