Cadence Design Systems interview question

How to remove adjacent duplicates in a string