Citadel Interview Question

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