Giving wrong ans ? why?

i am debugging please wait for some time

please refer to this explanation

@Muskan-Gupta-598128740703036

u need to remove
consecutive same remove elements then u dp