Can someone give a test case where my code fails or rather guide me to the correct approach ?

After taking care of the last digit cases, I’m using a greedy approach to find the first number that on removal will lead to (sum of digits) %3=0 and has the next number greater than itself. If such a number doesn’t exist, I remove the lowest rightmost number that will lead to that result.