Whenever you're ready, walk me through how you'd approach this.
Can you explain the time and space complexity of your solution for tree manipulation?