Citadel interview question

The string problem was medium level and tree problem is a basic DFS logic.