Pergunta de entrevista da empresa Tripadvisor

Given a binary tree with key, value pairs, write a function that duplicates the tree and changes the value at one of the keys.