Cisco interview question

remove all adjacent duplicates in string. new version