Company: Intuit_9_feb
Difficulty: medium
Directory Structure Queries body { font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", "Noto Sans", Helvetica, Arial, sans-serif, "Apple Color Emoji", "Segoe UI Emoji"; line-height: 1.6; } h1, h2 { border-bottom: 1px solid #ccc; padding-bottom: 5px; } code { background-color: #f0f0f0; padding: 2px 4px; border-radius: 3px; font-family: monospace; } pre { background-color: #f6f8fa; padding: 16px; border-radius: 6px; overflow: auto; } ul, ol { padding-left: 20px; } li { margin-bottom: 8px; } strong { font-weight: 600; } Directory Structure Queries Problem Description There is an existing directory structure organized as a tree with n nodes. You are given this initial structure as a list of edges. You also receive q queries to perform on this directory structure. The queries are of three types: 1. mkdir <parent-folder> <new-folder> : Create a new folder named <new-folder> under an existing folder <parent-folder> . 2. rmdir <folder-x> : Delete the folde