InterviewDigestInterviewDigest

OA Practice Workspace

Technical2026-08-16

Delete directory in file system that occupies more space and is far from root

AI-Expanded — inferred from the question title, not from the original candidate report

Given a file system represented as a tree structure where each node contains its size and a list of children, identify and delete the directory that occupies the most disk space. If multiple directories share the same maximum size, select the one located at the greatest depth from the root node to optimize for space reclamation.

Context & Summary

Technical Round with project discussion and file system question

💻 Coding practice works best on desktop.
Code editors are too cramped on mobile screens.