A utility function to create a new node
Node * newNode ( char key ) { Node * node = new Node ; node -> key = key ; node -> left = node -> right = NULL ; return node ; } unordered_set < string > subtrees ;