Meta Interview Question

find common ancestor; delete adjacent duplicate characters