How to solve a generalization of this problem?
Given a string, remove identical consecutive letters ( not only pair as mentioned in the above question).
For example, if you have
wwwhaat --> ht
whhhaah --> w
reallazy --> rezy
Can someone suggest me an algorithm? For finding the minimum string at the end of this deletion?